Local language modifications

Local language modifications

by Just H -
Number of replies: 3
Hi all

Moodle install: 1.6 Beta 1 (2006032900)

Have made a few modifications to the English language pack: English (en_utf8) and saved it as en_utf8_EM in the moodledata folder.

On logout the default language reverts back to en_utf8. On going to admin/site variables it still shows as en_utf8_EM but modifications are not shown throughout the site.

If I go to configuration/language the language has defaulted back to en_utf8.

To get the modifications to show I just need to change it in the dropdown and it's back.

Pretty sure I haven't missed anything simple so have reported as bug 5138.

Regards
H
Average of ratings: -
In reply to Just H

Re: Local language modifications

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Local languages should now be named like this:

en_utf8_local

Your users still select en_utf8, but the local pack will be checked FIRST. The local pack only needs to contain the local changes (you don't need a complete copy of the language you are modifying).
In reply to Martin Dougiamas

Re: Local language modifications

by Just H -
Hi Martin

How's life on the West Coast?

So let me get this straight (just reread Moodle docs again and still having a blonde moment - no offence meant to blondes and my apologies for perpetuating ridiculous stereotypes!):
  • if I want a local language as I have in 1.53+ I can no longer add a descriptor of my choosing it has to be called "en_utf8_local"
  • if I want to change course based language I assume, based on the first point, I'd create a folder called "en_utf8_course"
If so, how do I go about having multiple languages (modified English) for use within the same site?

Basically, I'm trying to set up another site, predominately a portal for collaboration between various organisations. In this scenario the terminology built in doesn't really suit (i.e. there won't be teachers, students, courses etc.). I realise other software (Drupal, Joomla, Typo3 et al) may well be a better solution but I'm also trying to convince the organisations in question to jump on the Moodle bandwagon for their CMS requirements. So, was hoping to set up the portal in Moodle and in a few months, start introducing some of our training into the portal; more chance of user buy in (gotta love buzz words!) if they are familiar with a product and can see how easy it would be transferring courses from internal sites to a central site. Hence, will be looking to have languages that are educational based (i.e. students and teachers or variations thereof) and corporate based.

Also hit a strange issue with the default install via cvs (don't think I changed any parameters even if there is an option) in that the en_utf8 folder is installed in moodle/lang and when trying to configure the language (e.g. edit strings, check for missing) I get the error message "to edit this language pack, you need to put it in .../moodledata/lang". When I move it to the relevant folder I get " Could not find English language pack!"

No offence taken if you would care to point out my stupidity and head me in the right direction smile

H

In reply to Just H

Re: Local language modifications

by Robert Brenstein -
The way I understand this:

Yes, in 1.6, languages are moved from moodle/lang to moodle data folder. This is explained someone in 1.6 infos. I guess English is put in lang for installation but the editable version should be in data folder. But this is my guess only.

Yes, in 1.6, the _local extension on a language pack has a special meaning. It is no longer an independent language but an extension of another langauage automatically inspected for new/changed strings. This is meant to simplify making minor changes to existing languages when setting up a proper language pack is not required.

You can still make your own language packs, of course. These can be set up as sibblings of current languages or as children. A siblling is a complete language pack whereas a child has parent parameter pointing to a complete language pack. The child language pack does not have to be complete.

_local languages are children so do speak except the relation is automatic through the name of the folder and the end user is not aware of it.

If you need multiple language variants on the same site, it sounds like a case for having several language packs setup as children of some common language. You can then assign them as needed to specific courses (on the course Settings page) or specific users (on user Profile). You can also have them listed in the language popup if you have one or you can set a specific language to be the site's language.

Moodle keeps checking language settings, at session, user, course, site levels and switches them according to context. In 1.5.x, this was not 100% clean, so may be you are seeing some bug, but in most instances I observed, this was a result of different settings for different levels.

Also, changing the default language for all existing users require a change directly in the database.

I hope this helps you, although in might not be 100% accurate.