DocsDeveloper guideBuild an add-on
Translations
OptiraPOS translates by exact English text. Write your strings in plain English, and they can be translated like core's.
1 min read
- On the server, wrap messages in
UiText::t('Sentence with :name', ['name' => $x]). The sentence is looked up in the user's language, then the names are filled in (app/Support/UiText.php:143-152). - In pages, the host swaps rendered strings for their value in the user's map (
app/Support/I18n/SourceTerms.php:4-6). php artisan optira:i18n-extractcollects terms fromapp/Addons(.vue,.js,.php) into the term catalogue, grouped by add-on folder (app/Support/I18n/SourceTerms.php:7-10,:240).