tolgee/core

PHP integration for Tolgee localization framework

Maintainers

Details

github.com/tolgee/php

Source

Issues

Fund package maintenance!
tolgee

v1.2-BETA 2021-03-20 06:42 UTC

README

Tolgee Toolkit

PHP integration library for Tolgee localization toolkit. For more information about Tolgee Toolkit, visit our documentation website toolkit.tolgee.io.

Installation

composer require tolgee

Usage

To use Tolgee with PHP, start with creating TolgeeConfig class instance and Tolgee class instance.

<?php

use Tolgee\Core\Enums\Modes;
use Tolgee\Core\Tolgee;
use Tolgee\Core\TolgeeConfig;

$config = new TolgeeConfig();
$config->apiKey = "your api key"
$config->apiUrl = "your api url"
$config->mode = Modes::DEVELOPMENT;

$tolgee = new Tolgee($config);

Then you can simply use Tolgee to translate strings:

$tolgee->translate("hello_world");

To learn more, check our docs.