Module Localizaiton
Posted by Chris Eaton
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
poll.php | 12.7 KB | open | download | frajo | 04/06/2005 | Read message |
Module Localizaiton September 09, 2004 09:59AM |
Moderator Registered: 18 years ago Posts: 634 |
Phorum now supports the ability to load appropriate language files from modules, so we can begin to make modules that support more then one language.
I've included details in how to do this in docs/creating_mods.txt, which you can view from CVS.
Because I know that not all modules will support all languages, Phorum will attempt to fallback to English when an appropriate language file is not found. I highly recommend that all mods include an english.php with English text in order to make sure that the module will at least work for everybody (even if it is not in the right language).
update - If you want to see what an example of a localized module looks like you can check out the current version of Online Users.
Edited 2 time(s). Last edit at 09/13/2004 04:55PM by Tridus.
I've included details in how to do this in docs/creating_mods.txt, which you can view from CVS.
Because I know that not all modules will support all languages, Phorum will attempt to fallback to English when an appropriate language file is not found. I highly recommend that all mods include an english.php with English text in order to make sure that the module will at least work for everybody (even if it is not in the right language).
update - If you want to see what an example of a localized module looks like you can check out the current version of Online Users.
Edited 2 time(s). Last edit at 09/13/2004 04:55PM by Tridus.
Re: Module Localizaiton October 02, 2004 05:48PM |
Registered: 18 years ago Posts: 683 |
Hi Tridus,
I'm trying to localise the poll-module. And I'm stuck with this:
$submit = '<input type="submit" value="Vote">';
how would you localise the "Vote"? No matter what I try - the string is never inserted instead eather the uncompiled code :
$PHORUM["DATA"]["LANG"]["mod_poll"]["VoteButton"]
is shown or nothing at all.
Any idea?
thanx
pat
I'm trying to localise the poll-module. And I'm stuck with this:
$submit = '<input type="submit" value="Vote">';
how would you localise the "Vote"? No matter what I try - the string is never inserted instead eather the uncompiled code :
$PHORUM["DATA"]["LANG"]["mod_poll"]["VoteButton"]
is shown or nothing at all.
Any idea?
thanx
pat
Re: Module Localizaiton October 03, 2004 05:13AM |
Registered: 18 years ago Posts: 683 |
Name of Lang-File October 03, 2004 10:33AM |
Registered: 18 years ago Posts: 683 |
Re: Name of Lang-File January 25, 2005 10:29AM |
Registered: 17 years ago Posts: 97 |
Re: Module Localizaiton January 25, 2005 11:30AM |
Registered: 20 years ago Posts: 1,076 |
Re: Module Localizaiton January 26, 2005 09:39AM |
Registered: 17 years ago Posts: 97 |
[forum.media-objektiv.com]
everything work except lang :(
can somebody tell me what string in poll.php included lang file?
Edited 1 time(s). Last edit at 01/26/2005 09:41AM by Avdoshyn.
everything work except lang :(
can somebody tell me what string in poll.php included lang file?
Edited 1 time(s). Last edit at 01/26/2005 09:41AM by Avdoshyn.
Re: Module Localizaiton January 27, 2005 06:46PM |
Registered: 20 years ago Posts: 1,076 |
Avdoshyn Wrote:
-------------------------------------------------------
> >
> everything work except lang :(
>
> can somebody tell me what string in poll.php
> included lang file?
If your phorums main lang-file is called english.php then the modules lang file has to be calld english.php.
if it's russian.php then modules lang file has to be called russian.php
There shouldn't be anything else to get it to work.
You can test it by modifying the default lang file, and then disabling and enabling the module in admin. Do the strings change?
---
-=[ Panu ]=-
-------------------------------------------------------
> >
> everything work except lang :(
>
> can somebody tell me what string in poll.php
> included lang file?
If your phorums main lang-file is called english.php then the modules lang file has to be calld english.php.
if it's russian.php then modules lang file has to be called russian.php
There shouldn't be anything else to get it to work.
You can test it by modifying the default lang file, and then disabling and enabling the module in admin. Do the strings change?
---
-=[ Panu ]=-
Re: Module Localizaiton January 28, 2005 05:25AM |
Registered: 17 years ago Posts: 97 |
Look I really carefull read the manual and installation proccess, and have done everything corresponding to it, maybe something wrong with the forum engine (i've made some changes for my personal tasks), so i want to see where additional file in includede so I can found a mistake.
Thanks
>
> If your phorums main lang-file is called
> english.php then the modules lang file has to be
> calld english.php.
>
> if it's russian.php then modules lang file has to
> be called russian.php
>
> There shouldn't be anything else to get it to
> work.
>
> You can test it by modifying the default lang
> file, and then disabling and enabling the module
> in admin. Do the strings change?
>
>
>
>
> -=[ Panu ]=-
Thanks
>
> If your phorums main lang-file is called
> english.php then the modules lang file has to be
> calld english.php.
>
> if it's russian.php then modules lang file has to
> be called russian.php
>
> There shouldn't be anything else to get it to
> work.
>
> You can test it by modifying the default lang
> file, and then disabling and enabling the module
> in admin. Do the strings change?
>
>
>
>
> -=[ Panu ]=-
Re: Module Localizaiton January 28, 2005 09:44AM |
Registered: 20 years ago Posts: 1,076 |
> > You can test it by modifying the default
> lang
> > file, and then disabling and enabling the
> module
> > in admin. Do the strings change?
> Look I really carefull read the manual and
> installation proccess, and have done everything
> corresponding to it, maybe something wrong with
> the forum engine (i've made some changes for my
> personal tasks), so i want to see where additional
> file in includede so I can found a mistake.
Hmm I hate top posting.
What I was trying to hint was that give us something more specific what you have done. Post your languagefile or something. Repeating the same unusefull report over and over doesn't change it to a usefull report. There's no magical book where we can read what is wrong without anything specific information about your problem.
There might be something wrong with the languagefile you are using, that's why I suggested you change the default file slightly and see if you can see the changes. So to verify it picks up the changes in lang-files to begin with.
---
-=[ Panu ]=-
> lang
> > file, and then disabling and enabling the
> module
> > in admin. Do the strings change?
> Look I really carefull read the manual and
> installation proccess, and have done everything
> corresponding to it, maybe something wrong with
> the forum engine (i've made some changes for my
> personal tasks), so i want to see where additional
> file in includede so I can found a mistake.
Hmm I hate top posting.
What I was trying to hint was that give us something more specific what you have done. Post your languagefile or something. Repeating the same unusefull report over and over doesn't change it to a usefull report. There's no magical book where we can read what is wrong without anything specific information about your problem.
There might be something wrong with the languagefile you are using, that's why I suggested you change the default file slightly and see if you can see the changes. So to verify it picks up the changes in lang-files to begin with.
---
-=[ Panu ]=-
Sorry, only registered users may post in this forum.