Joomla & Warp 7 // subtitle translation

// inside the /templates/yoo_XXXXX/styles/YOURSTYLE/layouts/widget.php // ADD ON TOP $lang=& JFactory::getLanguage(); $langTag = $lang->getTag(); // get the current language // ADD AFTER // $content = $this['menu']->process($widget, array('pre', 'subnav', $renderer, 'post')); $ini_array = parse_ini_file("language/overrides/".$langTag.".override.ini"); // open the language override of the current language foreach ($ini_array as $c => $v) { $content=str_replace($c, $v, $content); }
This is a little tip to have multilanguage warp subtitle without create one menu per language.
It is very useful if you use a component like FaLang to translate your website content.

Tuto for Warp 7 and Joomla. You don't have to edit core files, so you can update your template without any problem.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.