Hello.
VirtueMart 3.0.12 и Joomla 3.4.8
How to translate for a multilingual web-site title module VirtueMart Manufacturers, VirtueMart Category, VirtueMart Currency Selector.
I hope for Your advice.
Thank you.
Create a module for each language in Joomla administration and assign a language tag to each one.
Hello.
Three state language + English, seven modules.
For each language to duplicate the module.
Yes
Regards
Jörgen @ Kreativ Fotografi
You don't need to do this, if you add jText for module title !
Here a sample:
function modChrome_STYLE($module, &$params, &$attribs)
{
if (!empty ($module->content)) : ?>
<?php if ($module->showtitle) : ?>
<h3><?php echo jText::_($module->title); ?></h3>
<?php endif; ?>
<?php echo $module->content; ?>
<?php endif;
}
And you use a Joomal language KEY.
eg. for category module title : COM_VIRTUEMART_CATEGORY
I'm wondering why this is not in most templates as default, i have change this already for 4 or 5 sites, So you don't have to manage 3 time same VM modules only because the Module title ;)
Hello Patrick
Of course, should have hought of that :)
regards
Jörgen @ Kreativ Fotografi
Thank you. A hope appeared.
In what file to insert a code. :-[
/modules/mod_virtuemart_category/mod_virtuemart_category.php - error - 500
/modules/mod_virtuemart_category/tmpl/default.php - error - 500
modChrome is in your template:
YOUR_SITE/templates/YOUR_TEMPLATE/html/modules.php
If this not exist, check in YOUR_SITE/templates/system/html/modules.php and copy this in your template
/templates/protostar/html/modules.php - insert code unfortunately there is no result
Not knowing where to insert the KEY - COM_VIRTUEMART_CATEGORY inserted in
/language/
/administrator/language/
/modules/mod_virtuemart_category/language/
/templates/protostar/language/
Displays the key COM_VIRTUEMART_CATEGORY in the module header
Sorry
modChrome_STYLE
STYLE is to replace by your internal template style used to render the module in index.php
eg. modChrome_html5
in protostart you have some using none, this don't use modChrome_none but rendder directly.
So if you need to chenge this then you have to replace it :
<jdoc:include type="modules" name="position-0" style="none" />
to
<jdoc:include type="modules" name="position-0" style="mystyle" />
and use
// mystyle style
function modChrome_mystyle ($module, &$params, &$attribs)
{
if (!empty ($module->content)) : ?>
<?php if ($module->showtitle) : ?>
<h3><?php echo jText::_($module->title); ?></h3>
<?php endif; ?>
<?php echo $module->content; ?>
<?php endif;
}
for existing well style
function modChrome_well($module, &$params, &$attribs)
{
$moduleTag = $params->get('module_tag', 'div');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize != 0 ? ' span' . $bootstrapSize : '';
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'));
$headerClass = htmlspecialchars($params->get('header_class', 'page-header'));
if ($module->content)
{
echo '<' . $moduleTag . ' class="well ' . htmlspecialchars($params->get('moduleclass_sfx')) . $moduleClass . '">';
if ($module->showtitle)
{
echo '<' . $headerTag . ' class="' . $headerClass . '">' . jText::_($module->title) . '</' . $headerTag . '>';
}
echo $module->content;
echo '</' . $moduleTag . '>';
}
}
and each style used in your template
1)/templates/protostar/index.php --<jdoc:include type="modules" name="position-0" style="none" /> mystyle
2)/templates/protostar/html/modules.php -- insert "// mystyle style ...." and replace the general "function modChrome_well($module, &$params, &$attribs)...."
where is the error
I think that you don't understand.
This are all sample. So you have to check the style="XXX" XXX is the style to add in modchrome
modChrome is in your template:
YOUR_SITE/templates/YOUR_TEMPLATE/html/modules.php
This XXX style have to be the same as in your template index.php file.
If you don't understand, then add menu for each language, i think it's better ;)
Thank you