Language Selection Not Working

Language Selection Not Working

by Greg Wright -
Number of replies: 14

I am using Moodle 1.6.2. I have sucessfully installed es_utf8 and es_es_utf8 lang packs and they show up in all the drop downs. I have set the site's default language to es_es_utf8. However, no matter which language I choose, the site always shows in English. What am I missing?

Here are some of my settings:

Administration >> Configuration >> Variables 
lang: Espanol - Espana (es_es)
langmenu: yes
langlist:
langcache: no
locale: es_ES.UTF-8


PHP
allow_url_fopen = On

Permissions on dataroot/lang and below are 777

Permissions on dirroot/lang and below are 777

The other thing I have noticed is that in Administration >> Configuration >> Language, it shows all 3 langs in the drop down but it will only let me select English.

Average of ratings: -
In reply to Greg Wright

Re: Language Selection Not Working

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
I see one configuration error: the locale should be left empty.

Did you change the language setting in your profile to es?
In reply to koen roggemans

Re: Language Selection Not Working

by Greg Wright -

No. The locale is correct. Without it the site doesn't function correctly in Spain.

I've tried everything I can think of. I tried setting the lang in my profile, as well as setting the default lang for the site. It always come up in english.

It was working in 1.6.1. The problem started when we upgraded to 1.6.2.

In reply to Greg Wright

Re: Language Selection Not Working

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 locale is correct, but the field there should be left empty. The locale is in the language pack in langconfig.php. If you put one in that field, it will override the locales in the language packs and you want another locale for each language your user select.
Are you sure you replaced all your files when upgrading? I suggest to do a new download, move all your existing files to another folder and start of with all new moodle files.
In reply to koen roggemans

Re: Language Selection Not Working

by Greg Wright -

Regardless of the locale, language selection is not working. I tried removing it as you suggested but it still won't switch languages.

I thought about the possibility of missing a file in the upload so I tried uploading the files again a couple of days ago. Still the same problem. I will download a new copy and try that.

In reply to Greg Wright

Re: Language Selection Not Working

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
Do you have a space in your langlist by accident?
In reply to koen roggemans

Re: Language Selection Not Working

by Greg Wright -

I deleted everything and uploaded all new files (today's 1.6.2+ release). Still the same problem with one slight change. Now, it won't let me pick any other language.  It just goes back to the original. That is the same behavior I was seeing on the Administration>>Configuration>>Language screen earlier.

Very frustrating.sad

In reply to Greg Wright

Re: Language Selection Not Working

by Adrian Plant -
Similar problem. Have a course in english in V1.6. I downloaded the language pack for Spanish. I can select Spanish from the drop down menu but the only language change that occurs is in the Calender. All other menu heading stay in English.
In reply to Greg Wright

Re: Language Selection Not Working

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
Very difficult - I can't reproduce the problem, works fine for me.
In reply to koen roggemans

Re: Language Selection Not Working

by Adrian Plant -
I have just installed the international Spanish language pack and it works fine and  now the Mexican Spanish pack also works ok.  
In reply to Adrian Plant

Re: Language Selection Not Working

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
Did you install at first only Mexican without Spanish?
That could explain a lot, since the Mexican is dependent on the Spanish and only contains a small set of strings which are different in Spanish.

Edit: I added this information to the documentation on page http://docs.moodle.org/en/Language_import_utility
In reply to koen roggemans

Re: Language Selection Not Working

by Adrian Plant -
Yes I installed the Mexican language pack first because thats what I wanted.  Then whent that was a problem I decided to install the international Spanish as an alternative. If the Mexican pack only contains the additional strings that would explain things.  Im just a little concerned about whether when I switch on the Mexican version thats what im seeing and not the International Spanish version.  I will get it checked.  Thanks for your help.
In reply to Adrian Plant

Re: Language Selection Not Working

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
If you turn on es_mx, all strings that are different for Mexican (and are translated wink ) will appear in Mexican, then Moodle searches for the remaining strings (=not translated or the same as in Spanish) in es.
In reply to Greg Wright

Re: Language Selection Not Working

by Greg Wright -

Just for the record in case anyone else encounters this, the problem was with the database. There were multiple courses listed in category 0. There should only be one. Not sure why it has worked all along and then broke in 1.6.2

Thanks Koen for finding that!!