how can I do the manufacturer's name be written differently for different languages
my Opencart ver. 1.5.6
sory for bad English
I need this module (for version 1.5.6) http://www.opencart.com/index.php?route ... e%20brands
I found a solution - but does not operate normally, the code must be edited (can you help me)
Why don't you just use the tags you mentioned:
Then add preg_match on output before rendering.
In system/engine/controller.php find this line:
replace with (in my example language IDs are 1 and 2 for English and Russian respectively):
I found a solution to the problem ... but something does not see the attachment
Why don't you just use the tags you mentioned:
Code: Select all
{en}Daikin{/en}
{bg}Дайкин{/bg}
In system/engine/controller.php find this line:
Code: Select all
$this->output = ob_get_contents();
Code: Select all
//check for current language and do preg_replace on output
/* get current language ID */
$cur_lang_id = $this->config->get('config_language_id');
/* store buffer output in variable */
$html = ob_get_contents();
$tags = array('/\{en\}/','/\{\/en\}/','/\{bg\}/','/\{\/bg\}/');
/* do replacements */
if ($cur_lang_id == '2') {$html = preg_replace('/\{en\}.+\{\/en\}/','',$html);}
if ($cur_lang_id == '1') {$html = preg_replace('/\{bg\}.+\{\/bg\}/','',$html);}
/* remove tags */
$html = preg_replace($tags,'',$html);
//$this->output = ob_get_contents();
$this->output = $html;
I found a solution to the problem ... but something does not see the attachment
Attachments
Untitled-1.jpg (281.09 KiB) Viewed 603 times
метални табели отпечатване на флаери отпечатване на винил отпечатване на плакати
Who is online
Users browsing this forum: No registered users and 312 guests