Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
Giuseppe (Guest)
Giuseppe (Guest)
Hi all,
I need to set up a bilingual site.
No problem for the site messages (menus and viart messages)
But how can I present a product description in 2 different languages?
I would like to show description in language 1 to user that choose language 1 and description in language 2 to users that choose language 2.
Is this possible?
 
Ned
Ned
Just do the following using the start and finish language tags [xx]..[/xx]
 
 
[en]Blue with ten legs[/en][fr]Bleu avec dix jambes[/fr][it]Azzurro con dieci piedini[/it][sp]Azul con diez piernas[/sp][ru]Синь с 10 ногами[/ru]
 
You can select the language from the language selector block on the home page or use an index page with a couple of flags and use a map to select the input language ...
 
<map name="Map">
<area shape="rect" coords="253,377,355,403" href="index.php?language_code=it">
<area shape="rect" coords="253,345,355,371" href="index.php?language_code=fr">
<area shape="rect" coords="252,313,354,339" href="index.php?language_code=en">
</map>
 
Ned
Ned
..or use an index page.. I should have said "...or use an index.html page.."
 
(If you need an index.html page with a <map> to select the language as the front page to your site you also have to add
 
DirectoryIndex index.html
 
to an 'htaccess file so visitors pick the index.html page _before_ the index.php page.)
 
Giuseppe (Guest)
Giuseppe (Guest)
Thanks very much
Already tried and it works smoothly!
 
emresonmez
emresonmez
Ned, which file are you talking about here? I want English to be by default, and I want to represent 2 other languages. If a user select a language other then English, I do not want them to see any English at all. How can I for example edit the IntroMessage, Custom blocks etc. for non-english page visitors? Which file needed to be edit? Thanks
 
 
 
Just do the following using the start and finish language tags [xx]..[/xx]
 
 
[en]Blue with ten legs[/en][fr]Bleu avec dix jambes[/fr][it]Azzurro con dieci piedini[/it][sp]Azul con diez piernas[/sp][ru]Синь с 10 ногами[/ru]
 
Ned
Ned
Create each page or article or description with the languages you want for example -
"[en]Blue with ten legs[/en][fr]Bleu avec dix jambes[/fr][it]Azzurro con dieci piedini[/it]"
gives you English, French and Italian descriptions.
 
The initial language setting is in "includes/var_definition.php" as "$default_language" and this is set to English (en) when you install ViArt.
 
So when a visitor accesses your site they will _only_ see all text between the [en]..[/en] markers on every page that has it because the default language is "en".
 
Go to "Administration > Static Tables > Languages" and select the two other languages you want along with English and you have created language descriptions for - in my example - French and Italian.
This then creates a "languages block" with the selected languages represented by the 3 flags.
 
You can then include the "languages block" on pages by using "Administration > CMS > CMS Settings" and selecting the "languages" block on the pages you want it.
 
This allows the user to select a different site language by clicking on the flag. They then only see the text between the language markers they want - for example in Italian between the [it]..[/it] markers.
 
If you want the site language selection on entering the site put the language block on the home page.
 
Importantly the [xx]...[/xx] markers also work in "Administration > CMS > Layouts > Site navigation" allowing you to create menus that are specific to languages.