Page 1 of 1

[SOLVED] own custom language words / phrases in template

Posted: Mon Apr 28, 2008 10:44 am
by sirab
Hi,

I could not find the answer for my "problem" so am posting it here. I am using cmsms 1.2.4b (the multi language cmsms version).

I am working on a multi language site. All modules that I have installed have language files so they get translated whenever a user clicks on a different language.
Only, in my template I have some word or phrases which I put in myself. I need those to be translated also when a user clicks another language. Is there allready some function I can use, like {translate text="some text"} ?

I have made my own User Defined Tag for this, but need more than a few words in it, so I want to make a module for it, but not if something like this exists.

Sincerely,
Sirab

Re: own custom language words / phrases in template

Posted: Mon Apr 28, 2008 10:56 am
by Wiedmann
Tips and Tricks for MLE version #7
http://forum.cmsmadesimple.org/index.ph ... l#msg86552

For only a few languages, you can also using something like this in your template:

Code: Select all

{if 'en_US' == $lang}
    English word
{elseif 'fr_FR' == $lang}
    Frensh word
{else}
    default word
{/if}
(BTW: someone should move this thread)

Re: own custom language words / phrases in template

Posted: Mon Apr 28, 2008 11:03 am
by sirab
Ok, thank, that is what I allready made myself also. So there is no module for this yet I guess. Maybe I will make it then.

Re: own custom language words / phrases in template

Posted: Mon Apr 28, 2008 11:07 am
by Wiedmann
So there is no module for this yet I guess.
You read "Tips and Tricks for MLE version #7"?

Re: [SOLVED] own custom language words / phrases in template

Posted: Wed Apr 30, 2008 3:50 am
by Wiedmann
Hi Alby,
You read "Tips and Tricks for MLE version #7"?
I'm just thinking about this tip. And I don't think you should put the example files "en_US.php" and "it_IT.php" with this names into the archive. Because if some have own content in this files, and makes an upgrade, he override his changes (ok, allways make a backup before upgrade *g*).