0

So far I've translated the language files in the /modules/*/lang/et/ folders. 5 files total.

There are more changes required to enable the new translation. What are they?

dragontree
  • 1,709
  • 11
  • 14

2 Answers2

2

See https://github.com/octobercms/october/pull/2648/files which added a Lithuanian translation.

LukeTowers
  • 1,262
  • 7
  • 14
  • modules/system/lang/lt/lang.php includes the names of all the other locales. Therefore this file should be updated for all the languages? – dragontree Jun 01 '17 at 16:38
  • The natural name for the language should be present in the default system language file (i.e. en/lang.php) if possible, it shouldn't be translated though. – LukeTowers Jun 02 '17 at 19:30
  • But the backend preferences model uses the translation from the active locale: `Lang::get('system::lang.locale.et')` Doesn't that require the translation to be present in translation files for all the languages? – dragontree Jun 05 '17 at 07:17
  • Same goes for the `php artisan october:util compile lang` command – dragontree Jun 05 '17 at 07:25
  • dragontree, the translations trickle down. If your currently selected language doesn't have a value for the requested translation string, it looks at the default language (which is usually still set to English) to get the value for that string. – LukeTowers Jun 06 '17 at 15:38
  • `php artisan october:util compile lang` is used to compile JS translations, as used by `modules/system/lang/en/client.php` – LukeTowers Jun 06 '17 at 15:39
  • aah, nice. I'll make the PR soon – dragontree Jun 06 '17 at 15:39
0
  1. Firstly duplicate lang folder in the modules/backend and modules/system folders them from the language files.
  2. Rename the folder name according to the iso standard. (Example: Like en, ru, tr, az and etc.)
  3. Then add the information about the language you want to add to the modules / backend / models / Preference.php file.

The new language you created will appear in the CMS \ back-end preferences section. Screenshot new language

Rustem Hesenov
  • 429
  • 5
  • 6