rejetto forum

Multilanguage rawr template

0 Members and 1 Guest are viewing this topic.

Offline nuvolablu

  • Occasional poster
  • *
    • Posts: 61
    • View Profile
Hello,
   I know that RAWR template is multilanguage but we have to choose just one language!
It would be very usefull to allow the final user (the guy who browse) to choose between the languages like to put at the top of the page the interational flags or something like that.

Thanks in advance.
Best regards.
S.


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
This is an eventual capability I am hoping for. It could even be made automatic, detecting the dns of the user, however HFS cannot do this at the moment.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
{.switch|%lang%|en|{:english tpl:}|fr|{:french tpl:}|......  .}


Offline nuvolablu

  • Occasional poster
  • *
    • Posts: 61
    • View Profile
{.switch|%lang%|en|{:english tpl:}|fr|{:french tpl:}|......  .}

where I have to put it?
thanks in advance.
S:


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
INSTRUCTIONS :P

right click on the home/root > properties > diff template
paste this stuff

Code: [Select]
[+special:begin]
{.load|/template/rawr_default/languages/%lang%.txt|special:strings.}
{.if not|{.^special:strings.}|{:
    {.load|/template/rawr_default/languages/{.!language.}.txt|special:strings.}
:}.}
« Last Edit: January 22, 2010, 10:38:17 AM by rejetto »


Offline nuvolablu

  • Occasional poster
  • *
    • Posts: 61
    • View Profile
and what it should happend?
I tried it woks like abitual (nothing changed)
in fact I can't test it...
Thanks in advance for the explication.
forza raga!
Ciao.
S.
« Last Edit: January 21, 2010, 03:34:54 PM by rejetto »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
@nuvolablu
it will show the template using the same language of your browser.
if a translation for that language is not available, then it relies on the configured one.
if you already had configured "italian" and tried using an "italian" browser, then you'll see no change.
try configuring english and you'll see you'll continue getting an italian template, because of the "detection".


Offline nuvolablu

  • Occasional poster
  • *
    • Posts: 61
    • View Profile
@nuvolablu
it will show the template using the same language of your browser.
if a translation for that language is not available, then it relies on the configured one.
if you already had configured "italian" and tried using an "italian" browser, then you'll see no change.
try configuring english and you'll see you'll continue getting an italian template, because of the "detection".

good!
1)why not to put it in the template?
2)how can I test it?
thants in advance.
S.


Offline nuvolablu

  • Occasional poster
  • *
    • Posts: 61
    • View Profile
IT WORKS LIKE A CHARM!!!!
thanks a lot!!!!
U are great!

S.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
1) i believe customization should be kept detached from the template.
reason: when a new version of rawr will be published, you'll be able to upgrade without having to reapply all modifications.


Offline nuvolablu

  • Occasional poster
  • *
    • Posts: 61
    • View Profile
@nuvolablu
it will show the template using the same language of your browser.


I think it takes the language of the O.S.
I've altready installed the french version of opera browser...and hfs still keep the italian language (template set as default english)

the result is the same but...
what do you think?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
no. i'm sure it's the browser, i know because i tested it.
BUT consider that the language of the GUI is not bound to the language requested for web pages.
so it's likely that your french Opera decided to request italian pages because of your italian system, but you can change this, and to say it all, you didn't even need to download a different version of Opera.

CTRL+F12 > general > language for web pages

as i change the option in Opera, the template is changing its language, with not modification of HFS files.
« Last Edit: January 22, 2010, 10:42:52 AM by rejetto »



Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
I'll add this to the next build, whenever I get around to making it.