How to Make a New Language Pack?

How to Make a New Language Pack?

by N Hansen -
Number of replies: 13
I want to make some small edits to the English language pack. I am not editing all of the files in the language pack, only some. I have read the instructions about doing this but one thing remains unclear to me. In my new language pack, do I only need to include the files I have changed, with Moodle pulling the rest of the strings from the original English pack, as is the case with En_US?
Average of ratings: -
In reply to N Hansen

Re: How to Make a New Language Pack?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
In my new language pack, do I only need to include the files I have changed, with Moodle pulling the rest of the strings from the original English pack, as is the case with En_US?

Yes, and in those languagefiles you only have to put the strings you change. Don't forget to fill out "Parent language" with the language you want to fall back to for the missing strings
In reply to koen roggemans

Re: How to Make a New Language Pack?

by Tan M -

Yikes, I just can't seem to see where I set the "Parent Language" for my new language pack.  Is it a variable somewhere I have to change?  Is it in each individual language file?

I have made a language called en_local in which I have changed very few strings for very few files.  I want to make the parent language en_us.

In reply to Tan M

Re: How to Make a New Language Pack?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
The parent language setting resides in moodle.php.

Go to admin, language, edit strings, moodle.php (wich opens as default) and search for the string "parentlanguage"
In reply to koen roggemans

Re: How to Make a New Language Pack?

by Tan M -
Yay!  Mucho Gracias, Koen!
In reply to koen roggemans

Re: How to Make a New Language Pack?

by chris knowles -
Okay - this is probably a very simple question with a simple answer, but I cannot find it on the site so I thought I would ask people who might know.

We are developing a language translation that we want to cover the main parts of the Moodle functionality as they are pretty representative of what is currently available.
I am pretty new to being a site administrator so I followed the advice on the main moodle site about creating a new language pack - copying an existing pack and calling it under a new name and using that as the default.

I have edited the strings accordingly for the moodle.php file - again as recommended, but when I view the site using the language I have set up, there are lots of gaps in the basic interface elements of tools and features I would want to use in my courses, e.g. calendar.

How do I go about translating all the strings relating to the components I might use ( quizzes, calendar, journals ...etc).
Are the strings relating to them in the other php files listed (apart from moodle.php) ...., there look like there are lots of files - so is there any recommended order I should edit them in?


sorry if this is a very basic question......

ta
chris
In reply to chris knowles

Re: How to Make a New Language Pack?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
basic question: no problem at all smile

There is some documentation you can read here. (hm, it seems like I have to move that page, or is it already done?)
If it is not clear enough, please help us improve it with your questions wink

edit: it is moved to here: http://docs.moodle.org/en/Translation
(thanks Dagza and Helen!)
In reply to koen roggemans

Re: How to Make a New Language Pack?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Koen,

Thanks for updating MoodleDocs Translation. approve
In reply to Helen Foster

Re: How to Make a New Language Pack?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
It reminds me this will be a hugh challenge to create and follow a translation for the documentation. Now it can easily be done with the build in Moodle translator, being a part of the moodle docs in the language packs. Keeping this information on two places is a little bit stupid I think, so one has to go smile
In reply to koen roggemans

Re: How to Make a New Language Pack?

by Livingston Graham -

Hello

I need to create a Haitian Creole Language Pack.

I would like to know if anybody in this forum has done so already, or if somebody could guide me on the steps that need to be taken in oder to do that .

 

Thank you

In reply to Livingston Graham

Re: How to Make a New Language Pack?

by Phillip Rincon -

Hello Livingston,

I would like to know if you were able to create the Creole Language pack. I will be creating a few courses for Haiti and this would be greatly helpful. If it is created would you be open to sharing it with us? Thanks. 

 

Phillip Rincon

www.bochika.org

In reply to Phillip Rincon

Re: How to Make a New Language Pack?

by Gonela Sravya -

Hi All,

I would like to know if I can create a new language file in the core language pack of Moodle and add my custom strings there instead of adding my strings in moodle.php.

I have tried creating a file and added my custom strings and cleared the cache but the strings are not available. Please do suggest if I am missing anything.

In reply to Gonela Sravya

Re: How to Make a New Language Pack?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

https://docs.moodle.org/dev/String_API

Shortly, you can't simply add a new file into lang/en/ and expect it start working. The new strings are supposed to be part of a plugin.

If you are customizing Moodle for some local needs then a plugin type "local" might be suitable for you. That was introduced for these purposes. Usually, a proper plugin type such as admin tool or block may suite more. It really depends on the nature of your customizations.