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.
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
Xoops Demos:
http://www.nhatban.net/info/a0021.html

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]<script src="menu_lang1.js" type=text/javascript></script>[/lang1]
[lang2]<script src="menu_lang2.js" type=text/javascript></script>[/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

219 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 219


more...

Donat-O-Meter

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

Latest GitHub Commits