Privacy Settings 'urgent'

Hello,

My web site is in 4 languages, and i finished the translation, but in Privacy Settings i can not translate "Me Only, Public, Members, Friends", because they are listed in the 'sys_options' table.

I tried some solutions, in BxDolParams.php usinng Function getCurrentLangName, and swich to change the table and the cache file "sys_options.php" when changing languages, but when i use this function i got blank page in the site, even if i include the class wish is languages.inc.php,

I think that is serious, without this translation my project will down, i ask the boonex team to fix for us this issue, many members where asking that in many topics but still no solutions.

Quote · 22 May 2010

There is a easier way. You can try this.

In inc\classes\BxDolParams.php at line 48. Replace this function.

function get($sKey, $bFromCache = true) {
if(!$sKey) return false;
if($bFromCache && isset($this->_aParams[$sKey]))
return $this->_aParams[$sKey];
else
return $this->_oDb->getOne("SELECT `VALUE` FROM `sys_options` WHERE `Name`='" . $sKey . "' LIMIT 1");
}




With This

function get($sKey, $bFromCache = true) {
if(!$sKey) return false;
if($bFromCache && isset($this->_aParams[$sKey])) {
$sVal = $this->_aParams[$sKey];
if (substr($sVal,0,1) == "_") $sVal = _t($sVal);
return $sVal;
}
else {
$sVal = $this->_oDb->getOne("SELECT `VALUE` FROM `sys_options` WHERE `Name`='" . $sKey . "' LIMIT 1");
if (substr($sVal,0,1) == "_") $sVal = _t($sVal);
return $sVal;
}
}


What this does is cause the value to be replaced with the contents of the language key if the value is a language key.

So now to make that work just go to settings>privacy settings and change the default titles to a language key. For example change Me Only to _Me Only then add a new language key of _Me Only to the languages and a translation for each one.

Tested and works on my site.


However. I do not know what kind of effect this might have on the perams used throughout the site. If any of them happen to be prefixed with a _ (underscore) it could have unpredictable results.

But you're welcome to try it. Make a backup of that file first before you change it of course.


https://www.deanbassett.com
Quote · 22 May 2010

I realy dont know how to thank you, it helped mme a lot, thank you very very much :=).

Quote · 22 May 2010

Please i would like to know if i can use it to translate the ads categories and general categories in the site?

Quote · 23 May 2010

Something similar can be done if you can find the code that reads that from the database. I would look into it, but i am in the middle of another project at the moment.

https://www.deanbassett.com
Quote · 23 May 2010

Ok thank you keep me updated :)

Quote · 23 May 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.