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.
Options

Multi-Language Vanilla

edited March 2007 in Vanilla 1.0 Help
This is really a request for Mark, I think.

I really need to enable *at least* 2 languages in my forum. I know that there are a couple of extensions that would allow my users to select which language they would like to use in the forum, however, both extensions require me to make changes to the CORE - ie, alter php files that will be overwritten during upgrade.

Would it be possible for you to alter the core - hopefully, without too much work - in order to enable these multi-lingual extensions to work without breaking during upgrades?

Multi-lingual support is *extremely* important to non-English speakers - which the majority of the world is! :)
«1

Comments

  • Options
    The thing with forums is... the topcis and discussions are mostly in 1 language only... Why would you need multi-lingual menu options or error messages. Just make it the same as the discussion language.. But that's just my opinion :)
  • Options
    @Jazzman: let me give you an example, which is my forum. My forum is for learners and speakers of the international language, Esperanto. So, in my forum, I get people of various nationalities, including English speakers, because the Forum is located in Australia, and run by the Australian Esperanto Association. So, at the very least, the entire interface *should* be both in English, and Esperanto. Other languages would be a majorbonus for us, and would enable us to attract other nationalities, and make the forum truly international, rather than just local.

    Often people learning one language attend forums in that language, even if they still cannot fully understand it. In places like Europe, that is a constant. Not to mention the many people learning English all around the world, and that could certainly do with having - at least - the interface translated into their own language, but with the possibility of 'switching' to English when they feel ready.

    Lastly, there are some places in which people DO speak more than one language (Canada, Switzerland, India, etc.), and it would be nice to allow these people to switch from one language to another, if they choose.

    Whatever the reason, the truth is that regardless of the MAIN language of your forum, giving users the ability to select their own interface language WILL open it up to other markets.
  • Options
    I'm also working on a bilingual forum project, but honestly, I'm using Language Selector by Max_B, and the very few tweaks you need to make to the core aren't a big deal. It shouldn't take much time to hack it again after an upgrade - if still needed, because Max_B is also working to avoid this. I don't know what Mark is planning for the next release, but he wanted to add a few more definitions in the dictionary for an easier translation process (like discussion labels), so this kind of forum will be easier to set up in the future.
  • Options
    @Ø: Great! Thanks for the feedback!

    I was under the impression that the current CORE does not allow for that kind of functionality to be done with add-ons, but perhpas I was wrong! :)

    I'll look forward to the next release of "Language Selector"!
  • Options
    About need for multilingual:
    There are case when a site tends to aggregate an international community, where you can easily have categories for languages (and that's why I proposed my modification to Category Jumper to make it remanent), a main language for the common trunk and default interface...
    There are also many case where multi-lingual is useful, whispering etc...
    And moreover, if, as for the site I'm currently writing, the main application part is designed to be multi-lingual because it target an international audience, the forum embeded into must also offer language versatility, if only for the sake of coherence, friendlyness and incitation to join the community.
    And it's only a MINOR modification that Mark must make in the core, just a supplemental include at the right place. Waiting for this, I have given a way to use LanguageSelector whithout any modification to the core but at the expense of loading two dictionaries in a row.
    I think a much deeper issue is with extensions translation place. I have choosen to keep each translation in the extension directory, named from the language. I had to modify the extension management to have those files automaticaly included, but I'd like to see Mark implement this or an alternate way to do it.
  • Options
    edited September 2006
    There might be a solution, without editing the core.

    Add to LanguageSelector/default.php:
    ... if ( !array_key_exists('LANGUAGE_SELECTOR_VERSION', $Configuration) ) { AddConfigurationSetting($Context, 'LANGUAGE_SELECTOR_LANGUAGES_PATH', $Configuration['LANGUAGES_PATH']); AddConfigurationSetting($Context, 'LANGUAGE_SELECTOR_LANGUAGE', $Configuration['LANGUAGE']); AddConfigurationSetting($Context, 'LANGUAGES_PATH', $Configuration['EXTENSIONS_PATH']); AddConfigurationSetting($Context, 'LANGUAGE', 'LanguageSelector'); AddConfigurationSetting($Context, 'LANGUAGE_SELECTOR_VERSION', '2'); } ...

    Now, instead of including languages/english/definitions.php, init_*.php will include extensions/LanguageSelector/definitions.php

    You just need to rename LanguageSelector/LanguageSelector.php to LanguageSelector/definitions.php,
    Add at the start:
    $Configuration['LANGUAGES_PATH'] = $Configuration['LANGUAGE_SELECTOR_LANGUAGES_PATH']; $Context->Configuration['LANGUAGES_PATH'] = $Configuration['LANGUAGE_SELECTOR_LANGUAGES_PATH']; $Configuration['LANGUAGE'] = $Configuration['LANGUAGE_SELECTOR_LANGUAGE']; $Context->Configuration['LANGUAGE'] = $Configuration['LANGUAGE_SELECTOR_LANGUAGE'];
    And add at the end:
    include($Configuration['LANGUAGES_PATH'].$Configuration['LANGUAGE'].'/definitions.php');

    The only problem is that if you want to uninstall the addon, you have to go change the value of $Configuration['LANGUAGES_PATH'] and $Configuration['LANGUAGE] in conf/setting manually.
  • Options
    I thought the issue was that stuff like roles didnt get translated though?
  • Options
    @minisweeper: role translation is one of the issue. Mark already agreed to move it to dictionary in next release
    The second issue is using LanguageSelector without modifying the core.
    The sthird is including extension translations sotred in extension directories.

    @Dinoboff, your solution avoid the double dictionnary loading, at the expense of a rather obscure process.

    I'll let the end user choose his prefered solution, mine being adding ONE line to three core files, until Mark give some clear statement on those points.
  • Options
    "obscure process"? I am quite pride of this hack :-)
  • Options
    yeah, it's clever, sure.
    But I tend to avoid hacks when it can be done with a benign break to "THE CORE" dogma.
  • Options
    Does anyone have any reports on multi-lingual progress? - has Mark made any changes in regards to this in the latest 1.0.3 release?
  • Options
    @Mark: do you have any plans for implementing multi-lingual support for Vanilla any time soon?...
  • Options
    Hi Icouto! As I suggested earlier, you should try installing Max_B's Language Selector, the little tweak you need in order to make it work is actually simple. I've just finished another bilingual forum and it works pretty fine.

    (or maybe you already did this, and my post is pointless...)
  • Options
    @Max_B: apologies if this has already been covered elsewhere, but I haven't been able to find it after a couple of searches. I've noticed that some extensions have interface text 'hard-coded' into their script files, which makes them extremely unfriendly for multi-lingual sites. I guess the first question is: in the current version of Vanilla (1.1.x), although Mark has not yet built a full 'multi-lingual engine' into the core, is there a way for developers to build their extensions in a way that your 'Language Selector' will automatically pick-up different language versions, based on the user's selection? If so, are there some instructions or developer documentation that shows them how to do that?
  • Options
    edited March 2007
    Yes, we could, but nobody does it: http://lussumo.com/community/?CommentID=62299 See the following post from Max_B that would make things easier.
  • Options
    edited March 2007
    @Dinoboff: thank you for the link!

    If I understand correctly, what you and Max_B are saying is that the procedure for extension authors should be:

    1) the extension author should include in their extension package at least one language file, named after the language itself: "english.php", "french.php", etc.

    2) in their extension code, they should include the file by using:

    @include(THIS_EXTENSION_PATH . $Context->Configuration['LANGUAGE'] .'php');

    3) any string used in the user interface should be defined in that file, and used in the same way the strings from the current, default ".../conf/languages.php" are used.

    Can you confirm that this is correct? - and that this would also work with Max_B's "Language Selector" extension?
  • Options
    @Icouto: your assertions are correct.

    Note also that the supplemental include line per extension is a suggestion (and the way it works for me) but it has not been acknowledged by Mark, yet.

    The alternative method is to append any extension translation to the main Languages//definitions.php. This is a manual admin process.
    Do NOT use conf/language.php at all, it does not allow for multiple languages.
  • Options
    french.php ? Surely we should be using the short language codes for these language files?
  • Options
    we have to use $Context->Configuration['LANGUAGE'], the name of language folder, so yes, it could if the french folder was fr/
  • Options
    I just figure that it would be good practice to use the language codes and get this standardised now before anyone really does anything.
This discussion has been closed.