1
ORbit2
Xlanguage and javascripting
  • 2008/5/12 12:32

  • ORbit2

  • Just popping in

  • Posts: 36

  • Since: 2008/5/12


I am planning to use Xlanguage for my website but experience a problem. I use an external javascript for my drop-menu and want to switch the names of the links as well but unfortunately the script doesn't accept the [xx] marks.

Is there anyone who has a idea ?

2
ORbit2
Re: Xlanguage and javascripting
  • 2008/5/13 6:44

  • ORbit2

  • Just popping in

  • Posts: 36

  • Since: 2008/5/12


It's maybe an idea to have a script who detects the language of the visitor and assign the javascript with the menu in the right language.

I have searched for something like that but couldn't find it jet.

Does anyone know's such a script ?

3
kerkyra
Re: Xlanguage and javascripting
  • 2008/5/13 8:01

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


perhaps adding a function in include.php or somewhere, where it loads from the language files the menu names (you will have to add them there) and assign them to the template as smarty...js can read the smarty as long as its loaded on the template and not from an external file.
whttp://www.guidemap.gr - Beta is out...

4
avtx30
Re: Xlanguage and javascripting
  • 2008/5/13 8:50

  • avtx30

  • Not too shy to talk

  • Posts: 181

  • Since: 2006/10/12


Why xlanguage?

There are many better implementations of multilanguages

5
stefan88
Re: Xlanguage and javascripting
  • 2008/5/13 14:24

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Hi,

you can make two .js script files and load them depending on the language. You can use [xx] in theme.
So in your theme.html header you will have something like:

[lang1][/lang1]
[lang2][/lang2]

You can use the same thing to load language dependant images
..

6
ORbit2
Re: Xlanguage and javascripting
  • 2008/5/14 6:32

  • ORbit2

  • Just popping in

  • Posts: 36

  • Since: 2008/5/12


Thank you all for, i have tried stefan88 's idea and it works great ! Thank you Stefan88 !

By the way, Avtx30, you mentioned there are better implementations , like for instance ? and which things are richer than Xlanguage solution ?

For now I am helped forward and can continue the battle of translation

Thanks again !

Login

Who's Online

316 user(s) are online (279 user(s) are browsing Support Forums)


Members: 0


Guests: 316


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits