gleez/cms

i18n not load

azuya opened this issue · 9 comments

Hi, thanx for the great CMS (or CMF?)...
I've been translate gleez to Indonesian ( ID ) language, and it work perfectly, but have some trouble.

I created some module with structure like this:

modules/
-- mymod/
-- classes/
-- ...
-- config/
-- ...
-- i18n/
-- id.php
-- ...
-- views/
-- ...
-- init.php ( route to "/mymod/tes" for example)

and the module is active, but when i visit the page, the translation did'nt translated. Ex : on /views/tes.php i write this code : " "
Then i try to put the words in gleez/i18n/id.php or user/i18n/id.php, the words translated....

Did I miss something?

Thank you for reporting. It supposed to work, i'll test and update you.

Hi @azuya!

First, create for translation of your module <module_dir>/i18n/<your_lang>.php.
Then, please see to gleez/config/site.php at installed_locales section. Copy this file to application/config/site.php and edit to suit your needs

Thanks for using Gleez CMS.

Hello @sergeyklay ..
like i said, the translate is work fine, but mymod/i18n/id.php not load.

Copy this file to application/config/site.php and edit to suit your needs
I will try this....

You need to add your locale in config. Copy the file and add your locale to installed_locales array. Please check this https://github.com/gleez/cms/blob/master/modules/gleez/config/site.php#L224

Yes i did it, and it work.
But my question is, why translation not load from my module?
loadfile

@azuya
Hm.. Yesterday I faced a similar issue.
We will explore and fix this issue.

Thanks for the report!
Watch for updates.

OK i will.
Thankyou all...

@sergeyklay ... @sandeepone
problem solved, but still wondering why.
my translation load perfectly on my server(Ubuntu), but not load on local (windows).

Fine