Page 1 of 1

Language files doesn't work

Posted: Fri Jun 02, 2006 10:17 pm
by FinnK
I have great troubles in getting the language files for modules to work. I have tried everything I can think of, but nothing works.

Nobody on the Danish forum here have been able to answer my question on how a language file is being activated. However I presume this is done by means of the servers locale settings - or perhaps the locale setting in the cmsms config.php file. Am I right?

My server hosts use english locale eventhough their based in Norway as they have international customers. Further tell me their norvegian locale uses "no_NO" not "nb_NO" which cmsms uses. So after trying everything with "nb_NO" and "setlocale(LC_ALL, 'nb_NO');" in usermade tag I did the same with "no_NO" - I tried to rename the languagefile in the modules/news/lang/ext folder to "no_NO" and set locale to "no_NO" in the config.php file but that didn't work.

Then in desperation I renamed the language files so that I had the norwegian language called "en_US.php" in the "lang" folder - then I got the Norwegian prompts going: the norwegian "print" and "return" links from the detail template.

Although this works it is not the right way to do it.

I wonder what is not working here. How does cmsms do to find out the servers locale?

How does cmsms activate the language files in the lang/ext/ folder?

This is now almost the only thing to get working before I can put the site online. Another thing is to translate modules FrontEndUsers and Selfregistration - I have started the work, but it is not fun when I don't know how I will get the to work for me. My Norwegian site is here: www.filmklippere.com/cms

I really hope that someone can help me out on this.

Thanks

FinnK

Re: Language files doesn't work

Posted: Fri Jun 02, 2006 10:58 pm
by cyberman
FinnK wrote: However I presume this is done by means of the servers locale settings - or perhaps the locale setting in the cmsms config.php file. Am I right?
No and no.
How does cmsms activate the language files in the lang/ext/ folder?
Go in admin panel to "My Prefs - User preferences" and select your language  ;).

Re: Language files doesn't work

Posted: Sat Jun 03, 2006 8:58 am
by FinnK
I have done that. Norweigan works for Admin, but not for anything else.

...and when I select my language under user prefs. - what should happen under the hood of cmsms so it  picks the right language file for modules?

Re: Language files doesn't work for NEWS

Posted: Sat Jun 03, 2006 2:15 pm
by FinnK
This seems to be a proble ONLY for the news module. Translations I now have done for FrontEndUsers and SelfReg do work as they should.

Its when I display news detail I cannot get the Norwegian translations for Print and Return.

Re: Language files doesn't work

Posted: Sun Jun 04, 2006 3:32 am
by Ted
This is caused by the pretty urls.  Normally, the lang would be carried over in the big nasty url string.  I'll be doing a lot of reworking of the multi lang stuff soon, so it should clear it up.

Re: Language files doesn't work

Posted: Sun Jun 04, 2006 8:49 am
by FinnK
Thats good News ;)

Re: Language files doesn't work

Posted: Wed Dec 13, 2006 9:18 am
by avegard
Thanks for the tip. I did the rename of the en_US.php file, and that worked. I guess nothing else will?