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.
Multi-Language Vanilla
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!
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!
0
This discussion has been closed.
Comments
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.
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"!
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.
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.
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.
But I tend to avoid hacks when it can be done with a benign break to "THE CORE" dogma.
(or maybe you already did this, and my post is pointless...)
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?
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.