About content's translation.
After the navi-bar, I would like to make my site's content can switch with languge.Any solution can meet this requirement? for example, add some customized field in language files and quote them in template or diy.
Your guess is correct.
1) Add language variables what you need:
'your_variable1' => 'bla-bla',
'your_variable2' => 'bla-bla',
'your_variable3' => 'bla-bla',
etc.
2) Add in your template:
{lang your_variable1}
{lang your_variable2}
{lang your_variable3}
etc.
sc/lang_setting.php
template/xx/footer.php
Display Result:
What's wrong?
Wrong file.
Use sc/lang_template.php
(xx/lang_setting.php is for navigation link array only) Hmmm~awesome, it works.
Is there any post describe the relation between language files and exactly postion? For navi bar, if some language I don't write related language source, it will automaticly display english.
But the contents I write in the footer.php won't work like this, any language I don't write them in the language file, it will display as '!ifpay_sitemap!' after I choose to switch...So, any tricks? all the used language packs must be synchronized!
Add the same variables into:
ar/lang_template.php
de/lang_template.php
sc/lang_template.php
tc/lang_template.php
etc.
本帖最后由 leon 于 2013-10-1 06:36 编辑
Understand, it is the most correct solution.
But I mean when I add some customized Navi variables, I only add in /lang/sc/ and /lang/en/, when I switch to other languages, although I don't add variables in theirs language packs, they still can display as english, not "!variables!". This is the difference.
when I switch to other languages, although I don't add variables in theirs language packs, they still can display as english, not "!variables!"
Did you tried to clean the Cache after adding new variables?
No, I don't clean my cache. So you think this is the reason?
OK, never mind, I will follow the most correct solution, add variables in each language pack.
Pages:
[1]
2