Most, especially smaller, forums are not multilingual. After all, the prupose of a forum is to dicuss something, so if people are talking in Thai and you speak Hindi... it really doesn't contribute to the conversation :P.
However, there are often times when mutlilingual forums are desirable. Consider a forum for a game, to be released in many different countries. Consider one for a movie, or more importantly... an international project such as this one. Consider a forum for an international foundation or movement. Obviously, this is why SMF has such a feature, and why it's even used.
However, it's easy to forget about guests. If I speak German (only), and I find myself looking at an English forum... I may not realize it can switch to German. I may not realize that there's a board (or several) that contain posts of my langauge.... and I may just leave. Obviously, this is something to be avoided - but how?
Well, the first trick is that SMF allows anyone (guests, users, spiders, even dancing monkeys) to change their language at any time. The most noticeable way is in your profile, but that is only for registered members. The other way works only for as long as your browser is open, but can be used by guests - it is the "query string" method.
To use this method, you just put language=languagename in the URL. For example, you could use any of the following:
http://www.simplemachines.org/community/index.php?language=english
http://www.simplemachines.org/community/index.php?board=72.0;language=german
http://www.simplemachines.org/community/index.php?action=search;langauge=spanish
But, how can you utilize this? Well, there are a few ways, but one might be to use flags in the top right corner. You could then make the flag select the language it's tied to. The problem is, how do you know where you are?
One way would be to use javascript:
<a href="javascript:window.location += (window.location.indexOf('?') != -1 ? ';' : '?') + 'language=german';void(0);">...</a>
This would send them to the German version of the page they are on. (well, it wouldn't translate posts, or anything...) It's only downside is that if they are on a page that changes when you go to it, or requires input (such as a post preview or search results) it might give an error.
-[Unknown]
Nice one, didn't know you could do that.
One idea would be to point the URL for each language to it's area in the forum. So if someone changes to German, it'd load the German board. Eg: German (http://www.simplemachines.org/community/index.php?board=13.0;language=german)
How can a guest chsnge language?
Did you eaven read first post? http://www.simplemachines.org/community/index.php?language=german
If I have a navigation menu with quick links to some useful posts, how can I code the links so that guests using a different language won't end up back in English?
e.g. if I point to this post using the "standard" code:
<a href="http://www.simplemachines.org/community/index.php?topic=17595.0">....</a>
I'll end up in English since it's a static link
No, once the language has changed the change will "stick" until you change it again. Try it.
-[Unknown]
i use the same thing! only one problem when using SSI on my other pages it goes to my standard language english!
is there a way to fix that?
thanx unknown i use your method and clicking in nation flags forum begin in selected language
http://www.forumzoneru.25.com1.ru/index.php
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg67.echo.cx%2Fimg67%2F1188%2Fus5ob.jpg&hash=70982f87040e1da04be9d369770f034ab365287c)
Quote from: [Unknown] on May 17, 2005, 11:56:45 PM
No, once the language has changed the change will "stick" until you change it again. Try it.
-[Unknown]
yes but that means they need to enter the forum first before your index page! :-\ or not?
Quote<a href="javascript:window.location += (window.location.indexOf('?') != -1 ? ';' : '?') + 'language=german';void(0);">...</a>
No matter how I put this in my forum template i always get template parse error... I moded many things and they work like charm, i edited some stuff myself and also had no problems but this...
I did put links to 2 main languages but, those are fixed links that link to index page and not to specific page that was visited.. as i see ti this is the only way to do this, and this can't be inserted anywhere.... so.. any help would be very welcome
As the parse error page shows, you have to use a \ in front of the 's.
-[Unknown]
<a href="javascript:window.location += (window.location.indexOf(\'?\') != -1 ? \';\' : \'?\') + \'language=serbian\';void(0);">...</a>
<a href="javascript:window.location += (window.location.indexOf(\'?\') != -1 ? \';\' : \'?\') + \'language=english\';void(0);">...</a>
If i put it like this, it doesn't work, there is no parse error, but doesn't work... I'm probably doing something wrong..
Try:
<a href="javascript:window.location += (window.location.href.indexOf(\'?\') != -1 ? \';\' : \'?\') + \'language=serbian\';void(0);">...</a>
<a href="javascript:window.location += (window.location.href.indexOf(\'?\') != -1 ? \';\' : \'?\') + \'language=english\';void(0);">...</a>
-[Unknown]
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.burek.co.yu%2Fsmf%2FSmileys%2Fdefault%2Feusa_clap.gif&hash=2f9aa820f8fbf334db7889b8af7f86a209fe25a1)
Bravo! Ave [Unknown] !
Ok... But... where am I supposed to insert that code?
In wich php file?
:D
Anywhere you like. I'd suggest index.template.php.
-[Unknown]
Parse error: parse error, unexpected '<' in XXX/index.php on line 46
What am I doing wrong?
tryed everything...
Quote from: Serenity on May 31, 2005, 05:57:23 AM
i use the same thing! only one problem when using SSI on my other pages it goes to my standard language english!
is there a way to fix that?
We are having the same issue.
Hi...
I still have problems with this... I wrote about it on the help desk. Is there anyone willing to help?
Thanks :)
Brasileira, can you post three lines above and below where you're trying to insert it, please?
Quote from: smacktalk on August 19, 2005, 02:16:34 PM
Quote from: Serenity on May 31, 2005, 05:57:23 AM
i use the same thing! only one problem when using SSI on my other pages it goes to my standard language english!
is there a way to fix that?
We are having the same issue.
Are you using subdomains?
-[Unknown]
Quote from: [Unknown] on August 26, 2005, 01:14:35 AM
Are you using subdomains?
-[Unknown]
no. I think we have ours working now. The problem we have is when you click on the link to the topic, it goes to the forum but under the default language.
Hi Unknown :D
I am sorry, I got it fixed already
Thanks ;D
Quote from: edi67 on May 31, 2005, 09:18:59 AM
thanx unknown i use your method and clicking in nation flags forum begin in selected language
http://www.forumzoneru.25.com1.ru/index.php
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg67.echo.cx%2Fimg67%2F1188%2Fus5ob.jpg&hash=70982f87040e1da04be9d369770f034ab365287c)
Hi!
Can someone give me the code, in what files to put it and tell where to put images? I am trying to make it look like this above but just can't make it.. idiot, I know..
Please help!
So, isnt there a way to automatically get th language list?
I also need this solution ... so that I can place three languages or more ... like romanian dutch and english...
someone please I`m new at this !
But great forum btw ;) much better than phbbb !
Cheers 2 all !
Hi,
I am going through the old unsolved support topics. Have you tried the language dropdown modification available in the mods downloads section?
I have installed italian language pack (utf8) together with default english language and I'm trying to use both languages independently
So, after reading this topic, I just put a link directly to the two languages language like follows:
http://mysitename/community/index.php?language=italian-utf8
http://mysitename/community/index.php?language=english
..and It worked great; the problem is that when you try to register with a new username, after received the activation link you are being redirected to the english page.
Is there a way to change the instructions in the automatic activation mail so to be redirected to the italian language page and not to the english one and viceversa?
Should I change a script command some way? and anybody knows if there is a way to do it?
Thank you
hi rospone, can i ask did you get this sorted?