Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
2.4k views
in Q2A Core by

I thought of creating another forum which is for just a few people, however, these people speak different languages. To cover 3 languages in 1 forum I would like to add an option to switch languages.

This would require that q2a saves the language ID in the user profile data, and loads the according language file.

Has anyone written a plugin on that?

Will sth like that be implemented in 1.6?

Thanks,
Kai

Q2A version: 1.5.4
by
More info: In qa-base.php we have:
    $languagecode=qa_opt('site_language');
Here the forum language is taken.

In the recent version of q2a (1.5/1.6.0) it is not implemented.

What might work: Adding after:
    $languagecode=qa_opt('site_language');
something like (pseudo code):
    $languagecode=getUsersLanguage($recentUserID);

3 Answers

0 votes
by
You can set different domains to use the same database. In each of them you use a different language pack. Not the ideal solution but it should work.
by
This seems too much work. 3 full installations of q2a just to achieve that 3 different language files are called...
by
What I don't understand is what difference it really makes if the content asked and posted will still be in the same language.
by
Hi Ronlaw, nope, the content will be in 3 languages. English question, english answer. German question, german answer... but you are right, users have got used to it.

I will probably add an extra field for questions "language" and display questions only to the user's language :)
+1 vote
by

 

If you are not so concern about translation quality than you can use google language tool. You can simply embed to your website as a dropdown list and define your language and good to go..

Something like below

<script type="text/javascript">

function googleTranslateElementInit() {

  new google.translate.TranslateElement({pageLanguage: 'en',includedLanguages: 'en,fr', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
 
Or this
 
<form name="google_tr">
<select class="dropdown" name="example" size="1" onChange="location=this.options[this.selectedIndex].value+'&amp;u='+location.href">
<option value="" selected>Select a language:</option>
</select>
</form>

 

by
never rely on google services ;) just got a punch in my face losing google reader...
0 votes
by
edited by
...