Module Localizaiton
Posted by Chris Eaton
Re: Module Localizaiton January 31, 2005 04:00PM |
Registered: 17 years ago Posts: 5 |
I have posted in the mod_avatar thread since I have a localization problem with that module (see [phorum.org]).
What does it take to localize that module besides creating a file in mods/avatar/lang/ named as the main language file (eg. dansk.php).
Any input very much appreciated ;-)
/Stoltze
What does it take to localize that module besides creating a file in mods/avatar/lang/ named as the main language file (eg. dansk.php).
Any input very much appreciated ;-)
/Stoltze
Re: Module Localizaiton January 31, 2005 05:21PM |
Registered: 20 years ago Posts: 1,076 |
Re: Module Localizaiton February 01, 2005 02:58AM |
Registered: 17 years ago Posts: 5 |
Hi Panu,
I've tried the following.
1) Disable mod_avatar in admin.
2) Logged in as a regular user (avatar option gone as should be)
3) Enabled mod_avatar in admin.
4) Same problem :-(
The problem is not within my langauge file, since copying english.php and renaming it to dansk.php (the name of my main language file) does not solve the problem.
I could of course give the translations in the english.php file, but then the option to switch between danish/english would be gone...
Any other ideas? Is this a known problem - I've searched but not found any postings on this issue.
/Stoltze
I've tried the following.
1) Disable mod_avatar in admin.
2) Logged in as a regular user (avatar option gone as should be)
3) Enabled mod_avatar in admin.
4) Same problem :-(
The problem is not within my langauge file, since copying english.php and renaming it to dansk.php (the name of my main language file) does not solve the problem.
I could of course give the translations in the english.php file, but then the option to switch between danish/english would be gone...
Any other ideas? Is this a known problem - I've searched but not found any postings on this issue.
/Stoltze
Re: Module Localizaiton February 04, 2005 05:38PM |
Moderator Registered: 18 years ago Posts: 634 |
All it should take is creating the language file. The module is already localized, so you shouldn't even have to disable/enable the module for it to take effect.
The way it works is that when the lang hook is run, it tries to load a language file in /mods/some_mod/lang/langfile.php, where langfile.php is the name of the language file that is already loaded.
If it can't find that file or fails for some reason, it does a fallback and tries to load english.php.
My advice would be to turn on full error reporting, and see what comes up. Add this line early in common.php:
error_reporting(E_ALL);
And post any new messages that appear. Make sure that the user you are viewing the page in has a language other then english selected.
The way it works is that when the lang hook is run, it tries to load a language file in /mods/some_mod/lang/langfile.php, where langfile.php is the name of the language file that is already loaded.
If it can't find that file or fails for some reason, it does a fallback and tries to load english.php.
My advice would be to turn on full error reporting, and see what comes up. Add this line early in common.php:
error_reporting(E_ALL);
And post any new messages that appear. Make sure that the user you are viewing the page in has a language other then english selected.
Re: Module Localizaiton March 17, 2005 06:03AM |
Registered: 17 years ago Posts: 10 |
Sorry, I don't get it.
I was going to translate mod_poll into German "Du".
As far as I understand I need to translate the English strings into German strings, put it into a file called "german.php" and copy that into the lang-directory of the poll-mod (or something like that *g*). At least I thought that should be the trick, but it obvisously isn't *g*
I'm stuck on it: Where do I find the array to translate?
Thanks in advance,
Andreas
I was going to translate mod_poll into German "Du".
As far as I understand I need to translate the English strings into German strings, put it into a file called "german.php" and copy that into the lang-directory of the poll-mod (or something like that *g*). At least I thought that should be the trick, but it obvisously isn't *g*
I'm stuck on it: Where do I find the array to translate?
Thanks in advance,
Andreas
Re: Module Localizaiton April 06, 2005 09:05PM |
Registered: 17 years ago Posts: 2 |
Re: Module Localizaiton April 07, 2005 04:21AM |
Registered: 17 years ago Posts: 10 |
Re: Module Localizaiton April 07, 2005 02:28PM |
Registered: 18 years ago Posts: 683 |
Re: Module Localizaiton April 07, 2005 04:09PM |
Registered: 17 years ago Posts: 2 |
pat Wrote:
-------------------------------------------------------
> That's not true, I created a localised Version and uploaded it.
yeah, you're certainly right. i should have been more careful with my wording: i _preferred_ to "germanize" poll.php instead of looking for a localized version. it's the way OS/2 die-hards are used to. :)
-------------------------------------------------------
> That's not true, I created a localised Version and uploaded it.
yeah, you're certainly right. i should have been more careful with my wording: i _preferred_ to "germanize" poll.php instead of looking for a localized version. it's the way OS/2 die-hards are used to. :)
Re: Module Localizaiton April 07, 2005 05:20PM |
Registered: 20 years ago Posts: 1,076 |
Sorry, only registered users may post in this forum.