Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Choose Language Extension

edited June 2006 in Vanilla 1.0 Help

Here is my first extension (or hack) for Vanilla. This extension will
teach your Vanilla multiple languages. So that users and visitors can
choose the interface language they want.

If you install this extension correctly, you will see a new section
containing a <select> box in the left column of Vanilla. By using
this select box you can choose the language of the forum interface
(it works with a cookie).

You can preview this addon in my forum:

- Download extension for Vanilla 0.9.x
- Download extension for Vanilla 1
- More Info. / My website

Please read the included Readme.txt before you start the installation.

A question to the admin's:
Should I add my extension here?
And should I include this notice (it does not apply in my case)?

I hope everything works!

Feedback is desired :-)


  • Options
    Cool stuff. I couldnt remember if this had been done before but i'm pretty sure it hasnt. Neat that you made it for old and new versions of vanilla, too.

    You most certainly should add your extension to the directory, but i'm not sure what notice you're talking about?

    Just a few suggestions if i may (i havent looked at the code, though):
    1. Consider using an alternative to cookies to remember the language (i assume you already did - most extensions add stuff to the database where things need remembering but it strikes me your extension works with guests too where database addition isnt possible - the issue though is that some people wont allow cookies or whatnot)
    2. Consider moving the selection to the accounts page (again i realise for guests this isnt possible - and some people may want to flip languages quite regularly if theyre not native to either and find it easiest to cross reference - but for some users having the select box on the panel all the time may get annoying)

    Note that neither of these suggestions are criticisms, just ideas. Theyre both flawed aswell. I'm not sure why i bothered suggesting them since it seems you have it set up pretty much the best way. I suppose atleast theyre out there now, though.

  • Options
    lechlech Chicagoland
    This is a neat extension, it would be nice to see this performed in 0.9.3/1.0 as well. But by all means, do include a readme, even if it only says "THIS EXTENSION ONLY WORKS FOR VANILLA 0.9.2.x" for the time being, then people still using that generation of Vanilla or not will get the hint. Any further documentation you have on it is always a bonus, especially when it's based on who and where it came from.
  • Options
    MarkMark Vanilla Staff
    Yes, please upload it to the add-on repository. I'd upload it twice: one copy for the version that works with Vanilla 1, and one copy for the version that works with vanilla 0.9.2.x. Nice work!
  • Options
    edited June 2006
    Thanks for the kind feedback!
    I'm glad you guys like the extension!

    Yes, I had the same idea. But for now it was too complicated for me
    to add the language settings to the database. And another point is that
    peoples who disabled cookies, can't login to Vanilla, because the
    Vanilla session works also with cookies ;-)

    But I will try to implement your ideas in the next time.

    Hmm, I don't know if I did understand you. I already included
    Readme's (+Install instructions) into both extensions for Vanilla 0.9 and 1.0 ??
    But I added the warning, as you suggested :-)

    Yep, okay - I will add both extensions to the reponsitory.
  • Options
    Yeah, i think lech forgot his reading glasses in this thread. :)
  • Options
    lechlech Chicagoland
    Actually, I think lech was tired as hell and replying to the wrong thread under the wrong tab. Ignore my stupor!
  • Options
    lechlech Chicagoland
    Still a great extension though!
  • Options
    edited June 2006

    ah okay, now everything makes sense ;-)
  • Options
    why vanilla has english and none language. familiar but strange language ... Start a new discussion or Startanewdiscussion
  • Options
    ToivoToivo New
    edited June 2006
    could this extension be written in a more simple way. this is quite a work to do if the core changes .... 4. Open all files in the "appg" folder starting with "init_*.php" and search the line: include($Configuration['LIBRARY_PATH'].'People/People.Class.User.php'); and replace it with: include($Configuration['LIBRARY_PATH'].'People/People.Class.User.php'); include($Configuration['EXTENSIONS_PATH'].'ChooseLanguage/startup.php');
  • Options
    Toivo the Startanewdiscussion type thing occurs when vanilla cant find the language file and therefore uses the titles of the definitions, usually.
  • Options
    it happens when language is set to "None". Just tried out of curiosity ... :P
  • Options
    edited June 2006
    Hi everybody - this is my first comment, so let me greet everyone :D This extension seems pretty interesting, but I'd like to know if it could be modified to be used not only as a language chooser for the interface, but also for the discussions. Let me explain : I'd like to set up a multilingual forum which would only display discussions matching the user's selected language. Since I'm not a programmer, I've no idea how to code it, but I've a few ideas about how it would work. The registered user chooses a language in his account settings. Any discussion he starts is "marked" (tagged, I'm not sure how to call it) following this language. Then users with the same language see only the matching discussions. Users would of course be allowed to enable several or all languages from their account tab if they want to. Do you guys think it sounds crazy or doable?
  • Options
    Sounds like it would be simpler to set up categories for each language, and let people post in the right category (and have everyone block the language categories they don't want to see).
  • Options
    edited June 2006
    I agree, but your solution means a few problems anyway : - Imagine the forum uses 4 or 5 different languages, with basically 5 or 6 categories for each. Maybe some people enjoy browsing a full page of categories, but it's definitly not an ergonomic solution. - I know and use Vanilla since a few months, and I never understood until now there was a way to block categories. Okay, now the sticky category of this forum makes sense... I don't think I'm especially dumber than the average user (maybe I'm wrong) which means most of people simply won't block any category until I put a big sticky in every language to explain how to do. It will work for sure, but clicking on each category you don't want to display one after the other doesn't sound, err, elegant. However you made me think about subcategories. I've seen people talking about it and I don't know if an extension handles this, but maybe it would be a neat way to create a main category per language and use subcategories as "normal" categories.
  • Options
    There isnt an extension for subcategories yet but there has been a lot of discussion about it. As another alternative idea you could have a forum per language and link them to the same user base, but that means people wouldnt be able to easily see more than one language at once which again isnt ideal. Your initial idea should definitely be do-able with an extension though.
  • Options
    Well I'm glad to hear it should be possible. Now I just need to find someone to code it... I'll keep you aware of my progress.
This discussion has been closed.