The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
May 23, 2012, 04:13:29 AM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,604 Posts in 625 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto, iRealty and iLister v.5.x
| |-+  General iAuto Discussions
| | |-+  translate static content
« previous next »
Pages: [1] Print
Author Topic: translate static content  (Read 650 times)
TheBest
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: February 14, 2011, 02:20:24 PM »

Hello,
 
1.) I created static-content files:
 
imprint_de
imprint_en
..
 
2.) I copyied 'default.tpl' to 'imprint.tpl' (in /.../main) and replaced '{$MAIN_CONTENT}' with this:
 
{if $GLOBALS.current_language eq "es"}
        {module name="static_content" function="show_static_content" pageid="imprint_es"}
{elseif $GLOBALS.current_language eq "en"}
        {module name="static_content" function="show_static_content" pageid="imprint_en"}
{else}
        {module name="static_content" function="show_static_content" pageid="imprint_de"}
{/if}
 
3.) In AdminPanel I edit Site Layout -> Site Pages -> /about/ "Template" field and add there 'imprint.tpl'
 
Now,
- you can choose 'german' in FrontEnd and you see the german imprint..
- you can choose 'english' in FrontEnd and you see also the german imprint..
 
It seems like that $GLOBALS.current_language is not working? means is emty..
I tried out to 'read' $GLOBALS.current_language with this: Test: {$GLOBALS.current_language} but also got nothing..
 
What can I do?
 
Michael
Logged
gvAutoSaver
Newbie
*

Karma: 2
Posts: 12


View Profile WWW
« Reply #1 on: February 17, 2011, 05:38:55 AM »

Looking at the langSelector.tpl file, I would suggest trying:
Code:
{i18n->getCurrentLanguage assign="currentLanguage"}
{if $currentLanguage eq "es"}
{module name="static_content" function="show_static_content" pageid="imprint_es"}
{elseif $currentLanguage eq "en"}
{module name="static_content" function="show_static_content" pageid="imprint_en"}
{elseif $currentLanguage eq "de"}
{module name="static_content" function="show_static_content" pageid="imprint_de"}
{/if}

Otherwise, you could always try something like Google Translate: http://translate.google.com/about/intl/en_ALL/tour.html#professional
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!