Adding a language to the fuel cms and models

edited May 2013 in Modules
Hi All,

Today and yesterday I made some additions to the github languages (https://github.com/p3sn/FUEL-CMS-Languages).
Adding a folder 'dutch' into the language folder and translating it, setting the language of the user to Dutch will work for the Fuel CMS part.

But for some reason, if I translate other modules, like user_guide, backup, seo etc it doesn't work. They keep in English. Why do these tools don't look for the Dutch translation folder?

I'm using FUEL CMS 0.9.3.

Regards,
Peter Driessen

Comments

  • edited 11:52AM
    I'm assuming you placed the language files in their appropriate module folder correct (e.g. fuel/modules/{module}/language/dutch/)
  • edited 11:52AM
    Indeed, I did... setting the language to dutch, without creating a 'dutch' folder will leave the translations empty. Setting up a dutch folder with dutch translations will show the English language file.

    If I set up a Dutch and English file, and I change the English one (while having dutch as my language) I can see the changes then. So I'm pretty sure the modules don't make use of the Dutch translations. I will add all of my translations to github tomorrow, so you can check it out maybe.
  • edited 11:52AM
    Hmm... I'm not able to replicate that issue. Here is what I did to test:
    1. Went to MY_fuel.php and commented out all the modules except for the backup module.
    2. Went to the fuel/modules/backup/language/ folder and duplicated the english folder.
    3. Went into the newly created dutch folder and changed the $config['module_backup'] to something different in the backup_lang.php.
    4. Refreshed the page to note that the menu item under TOOLS > Backup was changed to the new name.

    Do those steps not work for you?
  • edited 11:52AM
    Did the same, and it didn't work for me...
    If I change the 'dutch' folder to 'dutch-1' for example. Then there will be no name (like Backup) visible. If I change it back to dutch, 'backup' is visible again... Changing $config['module_backup'] in the dutch file does not have any effect. Changing the $config['module_backup']in english does have effect.

    It seems it will look at the dutch folder, but somehow the English folder overrides it.

    If I change the english folder to english-1 for example, I get the message: Unable to load the requested language file: language/english/backup_lang.php. While my user language is set to Dutch... this shouldn't happen.

    Or are there other variables which I have to set to Dutch?
  • edited 11:52AM
    I'm having the same problem if I change the user language to spanish for example. The fuel module gets translated, the backup (and others) module not.
  • edited 11:52AM
    SOLVED: If I change the $config['language'] to dutch in: fuel/application/config/config.php, the language of the additional modules will change.

    Though a little bit weird I have to change it on two places. I thought FUEL would override the CI language config.
  • edited 11:52AM
    What is the language associated with the user you are logging in as? To change that language value you can click on the user name in the upper right corner and edit the user name value associated with that user in the CMS.

    I did find an issue if you are changing the language for the user there. I uploaded a fix for it under the 1.0 branch though.

    As a side note, have you tested it out in 1.0?
    https://github.com/daylightstudio/FUEL-CMS/tree/1.0
  • edited 11:52AM
    The language associated with the user was set to Dutch. Like I said: I tried it in Spanish too for example and got the same result (fuel module language is changing, the other modules not).

    I've downloaded and installed 1.0. I copied the other modules then FUEL into 1.0 and the translations seems to work now. Next thing for me to do is to change the language file again, as their are differences between 1.0 and 0.9.3.

    Thanks for your help, it seems to be resolved in 1.0
  • edited 11:52AM
    Hmm... i've edited the fuel_lang.php on github. Now there's a patch1: https://github.com/daylightstudio/FUEL-CMS/pull/184

    Is this the right way to participate?
  • edited 11:52AM
    I do see your pull request so thanks. However, it looks like it is merging with the master branch instead of the 1.0 branch? If that is the case, here is some docs on how to do it on a specific branch. Thanks again and I'll go ahead and make that change manually to the 1.0 branch.
    https://help.github.com/articles/using-pull-requests#changing-the-branch-range-and-destination-repository
Sign In or Register to comment.