parent languages - where are they?

parent languages - where are they?

by Joseph Rézeau -
Number of replies: 2
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

1- I seem to remember that there is a system in Moodle whereby some languages can declare a "parent" language. For example, fr_ca would declare fr as parent, en_us would declare en, etc. This would make only necessary for the "children" languages to list those few language strings different from their "parent" language. I have installed fr_ca and en_us on my moodle site, but cannot find where the "parent declaration" is located. Where are they?

2- It is also possible for language files located in modules folders to use the parent/children system?

Joseph

Average of ratings: -
In reply to Joseph Rézeau

Re: parent languages - where are they?

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Joseph,

You'll find the 'parentlanguage' string in the file langconfig.php of each language pack, when it has to be defined (see for instance the fr_ca_utf8 lang pack, where you'll find $string['parentlanguage'] = 'fr_utf8';).

When there's no parent language (e.g. for package fr_utf8), the string is not defined, and the default lang pack (en_utf8) is automatically used for undefined strings.

In reply to Nicolas Martignoni

Re: parent languages - where are they?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks Nicolas,
Thanks to your reply I have also found the answer to my question 2: I have to put in my mod folder, at \lang\fr_ca_utf8\ a langconfig.php file with just one string: $string['parentlanguage'] = 'fr_utf8';
et voila!cool
Joseph

Average of ratings: Useful (1)