Log in

View Full Version : Language Chooser with flags


Popa Andrei
09-29-2010, 01:59 PM
Hello there i would love a plugin or a modification that will add the flags of the selectable languages of the gorum somewhere in the navbar or the header.

Or if someone could tell me how to add them in the header so that when someone click on the flag that flags changes tot the respective language.

Popa Andrei
10-08-2010, 11:33 PM
no one interested with this?

BirdOPrey5
10-09-2010, 12:23 AM
You can do this yourself... If you change languages you'll see your URL change and end in something like "?langid=3" - the number is the id number of each language you have installed.

You can make a link to your forum home (or any other page) and end the URL with ?langid=X where X is the id number... so if english is id 1 you could have an american flag with the link to http://www.yourdomain.com/forums/?langid=1 and a French flag with a like like http://www.yourdomain.com/forums/?langid=2... etc...

Popa Andrei
04-04-2011, 06:10 PM
yes but how do i enter the link for the curent location of the user?

BirdOPrey5
04-04-2011, 08:18 PM
You want to link to the current URL so the user comes back to the same page after they click on the flag? That's a good question. The answer seems to be here: https://vborg.vbsupport.ru/showthread.php?t=241277

Basically:

<a href="http://yourforum.com/{vb:raw relpath}">IMAGE HERE</a>

Popa Andrei
05-25-2011, 09:37 PM
and on the link how to i make to change the language id?

BirdOPrey5
05-26-2011, 01:37 AM
try

<a href="http://yourforum.com/{vb:raw relpath}&langid=2">IMAGE HERE</a>

Change "2" to the id of the language you want to change to.

Popa Andrei
05-26-2011, 07:43 AM
oooooooo!
thank you very much kind sir ;)

Popa Andrei
05-29-2011, 08:44 PM
I found a new issue.
When i am on the default forum page the selector doesent work but on all the other it works.
Any idea why?
http://www.stormzone.ro/forum

BirdOPrey5
05-29-2011, 09:00 PM
I found a new issue.
When i am on the default forum page the selector doesent work but on all the other it works.
Any idea why?
http://www.stormzone.ro/forum

It's working for me- I just switched between Romanian and English and back again on the URL you posted. Did you fix it already? :confused:

Popa Andrei
05-29-2011, 09:17 PM
i get a link of page not found.
http://www.stormzone.ro/forum/forum.php&langid=3

the link should be this
http://www.stormzone.ro/forum/forum.php?langid=3


EDIT:

fixed the code
instead of
<a href="http://www.stormzone.ro/forum/{vb:raw relpath}&langid=3"><img src="/forum/images/cms/Romania-Flag.png" /></a></td>
y put
<a href="http://www.stormzone.ro/forum/{vb:raw relpath}?langid=3"><img src="/forum/images/cms/Romania-Flag.png" /></a></td>

BirdOPrey5
05-29-2011, 09:43 PM
But does it still work on other pages with the "?" ?