gibt es die möglichkeit blöcke gezielt einer sprache zuzuordnen?
beispiel:
ich erstelle einen html-block und fülle ihn mit deutschen informationen.
nun möchte ich die gleiche information aber auch den englischsprachigen usern zukommen lassen. und den franzosen auch...
an gleicher stelle, mit gleichem inhalt aber eben in der entsprechenden sprache.
function getBlockCode_Echo( $iBlockID, $sContent ) {
After the above line insert this lines :
$sContent = "XXX ".$sContent;
$res = db_res("select `ID`,`Key` from sys_localization_keys"); // FOR 7.0.0 only
$res = db_res("select `ID`,`Key` from LocalizationKeys"); // FOR 6.1.6 only
while ( $arr = mysql_fetch_array($res) )
{
if ( strpos($sContent,$arr[Key]) > 0 )
$sContent = str_replace($arr[Key],_t($arr[Key]),$sContent);
}
$sContent = str_replace("XXX","",$sContent);
2) In the Admin Panel >> Builders >> PageBuilders
HTML block editing, add underscoce infront of the string you wish to make it multilingual.
Example : _multilanguageHTMLblock
3) In the Admin Panel >> Manage Languages -- http://<yoursite>/admin/lang_file.php << 6.1.6
In the Admin Panel >> Manage Languages -- http://<yoursite>/administration/lang_file.php << 7.0.0
click the link "Add a new language key" window will popup, fill up the fields
New language key name: _multilanguageHTMLblock
Category: Misc
String texts for available languages: testing me viewing a multilanguage HTML block