We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

No fallback to English language | Forum

Veronica Feb 11 '13
All decent multi language software do have a fallback to English when there is a missing text in a foreign language pack.

Why not Oxwall?
Improper design?

Now missing text will create empty items.
This is terrible when you are upgrading to a new version of Oxwall
Veronica Feb 12 '13
Not at all similar

This only shows how poor your language support is.
MattS Jan 15 '14
Hi, I made a hotfix for this. It replaces keys with no translation with it's English value and also saves this value to the current language in English. So it's easier to find and translate. This fix is for version 1.6. Replace the ow_core/language.php file with the attached. Note, backup your old language.php first just in case.
MattS Jan 15 '14
Ok, it didn't let me attach a php file. So here are the changes I made to ow_core/language.php

1) Add these lines above private function __construct()

private $fallback_lang;
private $fallback_lang_id = 1; // Id for English

2) Add this line inside private function __construct()
$this->fallback_lang = OW::getPluginManager()->getPlugin('base')->getPluginFilesDir()."lang_".$this->fallback_lang_id.".php";

3) Copy&paste the below right after $text = BOL_LanguageService::getInstance()->getText(BOL_LanguageService::getInstance()->getCurrent()->getId(), $prefix, $key);

                    include $this->fallback_lang;
                    if(isset($language[$this->fallback_lang_id][$prefix . '+' . $key]))
                        $text = $language[$this->fallback_lang_id][$prefix . '+' . $key];
                        BOL_LanguageService::getInstance()->addOrUpdateValue( BOL_LanguageService::getInstance()->getCurrent()->getId(), $prefix, $key, $text);

Save and enjoy! ;)

Mohammad Jan 15 '14
it's great but English pack itself still has a lot of useless text key

it's much better if you upload itYou can zip it first then upload your file

MattS Jan 15 '14
Yes, you are right about the carbage in the English pack, annoying. Here's the zipped version also.
  language.php.zip (1.68Kb)
Mohammad Jan 15 '14
Thanks MattS 
ox-fr.org Aug 20 '14

Hello MattS

Do you think we can use your solution for Oxwall 1.7 ?

Wolfy Nov 26 '14
MattS Thank you !

It also works on 1.7.1 & 1.7.2

Great work saved me a bunch of time :)
Marius Apr 9 '15
MattS Thank you ! You are GREAT !!!
Webster Molaudi
Webster Molaudi Jul 13 '17
Matts.... Thank you Mate ! You are a STAR !!! ;)
MyKey Mar 10
Yes - you're the man - Thank you - working in 1.8.4 too!