PHP code example of andreazorzi / laravel-tolgee-translator
1. Go to this page and download the library: Download andreazorzi/laravel-tolgee-translator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
andreazorzi / laravel-tolgee-translator example snippets
/*
* Tolgee service host
*/
'host' => env('TOLGEE_HOST', 'https://app.tolgee.io'),
/**
* Your tolgee api key
*/
'api_key' => env('TOLGEE_API_KEY'),
/**
* Tolgee project id
*/
'project_id' => env('TOLGEE_PROJECT_ID'),
/**
* Default project language
*/
'locale' => env('TOLGEE_LOCALE', 'en'),
/**
* Overwrite base locale translations files.
*/
'override' => env('TOLGEE_OVERRIDE', false),
/**
* Accepted translation states. Check Tolgee documentation for available states.
* Ex: REVIEWED,DISABLED,UNTRANSLATED,TRANSLATED
*/
'accepted_states' => explode(",", env('TOLGEE_ACCEPTED_STATES', 'REVIEWED')),
/**
* Files to ignore during sync.
*/
'ignore_files' => explode(",", env('TOLGEE_IGNORE_FILES', '')),
/*
* Set a specific subfolder for language files
* Ex: app/lang/{locale}/tolgee -> "tolgee"
*/
'lang_subfolder' => env('TOLGEE_LANG_SUBFOLDER'),
/*
* Set a specific subfolder for language files
* Ex: app/lang/{locale}/tolgee -> "tolgee"
*/
'sync_on_production' => env('TOLGEE_SYNC_ON_PRODUCTION', false),
tolgee('pages.index.title');
bash
php artisan tolgee:export-keys
bash
php artisan tolgee:delete-keys
bash
php artisan tolgee:sync-translations
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.