I successfully installed and made the cms multiple language versions working...
However, I cannot do somethings . Hope people in here can give some hints
Background:
I have CMSMADESIMPLE with 2 languages. One is chinese and another one is english.
Questions
Q1.) I have 2 images one with chinese words in it and one with english words in it. I want to show chinese images when the system in chinese mode, and showing english images when english mode.
Currently, in multilple languages pack, all language for page are sharing single template, so I only can put one images (either english and chinese) in template. Are there some modules or whatever tricks, so I can get the url tag ... hl=en and make my templates show a suitable images
my url ... http://www.autosolution-hk.com/prj/cmsm ... php?&hl=en
Q2) How News module can be multiple languages ?
THANKS A LOT IN ADVANCE..
Help with multiple language things
Re: Help with multiple language things
Tomorrow I publish a version MLE 1.1.1-SVNcpyu99 wrote: I successfully installed and made the cms multiple language versions working...
However, I cannot do somethings . Hope people in here can give some hints

In this version of MLE you can add in template:cpyu99 wrote: Q1.) I have 2 images one with chinese words in it and one with english words in it. I want to show chinese images when the system in chinese mode, and showing english images when english mode.
Currently, in multilple languages pack, all language for page are sharing single template, so I only can put one images (either english and chinese) in template. Are there some modules or whatever tricks, so I can get the url tag ... hl=en and make my templates show a suitable images
my url ... http://www.autosolution-hk.com/prj/cmsm ... php?&hl=en
Code: Select all
{if $smarty.get.hl == 'en'}
<img src="en.png" />
{elseif $smarty.get.hl == 'b5'}
<img src="b5.png" />
{/if}
Code: Select all
<img src="{$lang}.png" />
Add new categories:cpyu99 wrote: Q2) How News module can be multiple languages ?
General_en, General_b5
and add a similar above example
Alby
Re: Help with multiple language things
Hello alby,

Please tell us more about this dev. Is it a followup of katon's 1.0.2-MLE ? It is a "technology preview" of Official 2.0 ? Is it something else of your own ?
I'd like to read from you about "single tree, news", multilang implementation design and "TCN".
Pierre M.
Nicealby wrote: Tomorrow I publish a version MLE 1.1.1-SVN![]()

Please tell us more about this dev. Is it a followup of katon's 1.0.2-MLE ? It is a "technology preview" of Official 2.0 ? Is it something else of your own ?
I'd like to read from you about "single tree, news", multilang implementation design and "TCN".
Pierre M.
Re: Help with multiple language things
Ok, it's a followup of katon's 1.0.2-MLEPierre M. wrote: Hello alby,
Nicealby wrote: Tomorrow I publish a version MLE 1.1.1-SVN![]()
Please tell us more about this dev. Is it a followup of katon's 1.0.2-MLE ? It is a "technology preview" of Official 2.0 ? Is it something else of your own ?
I'd like to read from you about "single tree, news", multilang implementation design and "TCN".
I had a site with MLE 1.02.
I wanted upgrade to new version of official release of CMSMS and I couldn't wait 2.0 release for security problem

It's very very "great and simple" for users but this project is dead

I have apply patch parts to 1.07, 1.08 and in production with 1.1 and I think that works.
Now, I have apply to 1.1.1 (SVN revision 4080).
Principal differences:
- Limited difference (in number and part) of files for relative simple synch with official CMSMS release
- Change language array config_lang.php to locale (no en,es but p.e. en_GB,es_MX) for finest language selection
- Selected language is define in:
locale, frontend language, current language (in this way CMSMS load current locale language for ALL modules)
- Define a smarty compileid language dependant for avoid compiling and caching problem with a unique template for all languages
- Increment of caching at level of official release (caching of MLE 1.02 is off)
- Smarty template variable {$lang} assign to current locale language (p.e. en_US, it_IT) and {$currlang} (p.e. en, it) for use in metadata language tag
- Define a personal language file (mle/lang/*.php) for template, you use {$mle_translation.your_key_for_translation}
- Try to recognize user visited and display relative language (TCN plus cookie), DEFAULT LANGUAGE if not. It's the method of php site and similar to this
- Add use of additional content block (language dependant transparent) {content block="contentblockXXXX"}
Tomorrow I make an post with more detail and link to complete release and a zip of changed files only
Alby
Last edited by alby on Wed Aug 22, 2007 8:34 pm, edited 1 time in total.
Re: Help with multiple language things
Hi, Im using the Albys proposed snippet of code for getting the lang parameter from url
It works fine, but not if I use the pretty urls.
Can you help me how to modify the template script?
Thanks, bye Miro
Code: Select all
{if $smarty.get.hl == 'sk_SK'}
({$job->year}) {$job->title_sk} <br />
<span>{$job->content_sk}</span>
{elseif $smarty.get.hl == 'en_GB'}
({$job->year}) {$job->title_en} <br />
<span>{$job->content_en}</span>
{elseif $smarty.get.hl == 'de_DE'}
({$job->year}) {$job->title_de} <br />
<span>{$job->content_de}</span>
Can you help me how to modify the template script?
Thanks, bye Miro
Re: Help with multiple language things
I move in proper forum (this topic had not seen in previous!)xmas3 wrote: It works fine, but not if I use the pretty urls.
Can you help me how to modify the template script?
Try with $lang variable:
Code: Select all
{if $lang == 'sk_SK'}
({$job->year}) {$job->title_sk} <br />
<span>{$job->content_sk}</span>
{elseif $lang == 'en_GB'}
({$job->year}) {$job->title_en} <br />
<span>{$job->content_en}</span>
{elseif $lang == 'de_DE'}
({$job->year}) {$job->title_de} <br />
<span>{$job->content_de}</span>
Re: Help with multiple language things
Yeah,
it works now! Thanks!
it works now! Thanks!