Hello,
after updating to VirtueMart 3.6.8 10197 when I change the language from the menu on the site side, everything is translated except for the categories and product names. Help!
Have You translated the categories and the product names ?
An URL would be nice :)
Jörgen @ Kreativ Fotografi
Quote from: Jörgen on November 08, 2019, 15:15:52 PM
Have You translated the categories and the product names ?
An URL would be nice :)
Jörgen @ Kreativ Fotografi
Hello,
They are all translated into 5 languages is a B2B and has been in production for several years now if you want I can send you a private message with user and password
Link: https://b2b.maglificioliliana.com/
I noticed that for the categories and product names the browser language is taken and the language change menu is not considered.
Can someone help me?
Thanks
Have you set 1 item menu>virtuemart>category for each shop language?
Quote from: Studio 42 on November 08, 2019, 23:45:09 PM
Have you set 1 item menu>virtuemart>category for each shop language?
it exists
I do not understand,
everything seems to be configured correctly but after updating the categories and product name do not change language instead the descriptions change correctly.
Please help
Sorry, but you need to hire someone to debug or give full access to your site, this is not a support center but we can help if we can quick fix it.
In your case, the problem is strange and never reported, so can be a server cache or something specific to your template or config.
hi, the same thing is happening to me too, just after updating to version 3.6.8 10197 the language does not change anymore. This happens in a site that has always worked and only in the part concerning virtuemart that is correctly translated.
Giovanni.
Quote from: giosto on November 11, 2019, 15:43:59 PM
hi, the same thing is happening to me too, just after updating to version 3.6.8 10197 the language does not change anymore. This happens in a site that has always worked and only in the part concerning virtuemart that is correctly translated.
Giovanni.
I also don't know what to do to fix this, I hope someone can help us solve the problem.
activating debug it seems that the language of virtuemart is no longer changed.
1 vmdebug 2 Languages, default shoplanguage (VmConfig::$jDefLang): it_it it-IT Selected VM language (VmConfig::$vmlang): it_it it-IT SEF: it $lfbs =
even if I'm constantly changing the language from Italian to English, debugging ALWAYS reports Italian.
Again, everything worked fine before virtuemart was updated.
Are You using breakdesigns custom fields for all ?
Jörgen @ Kreativ Fotografi
I can't reproduce that language problem. In my case VirtueMart 3.6.8 10197 language switching always loads all translated elements in the selected language.
@elanto75
When I clicked on one of the brands on the login page you linked above, my Firefox inspector initially showed many javascript errors (probably cloud loading problems).
Perhaps clearing all cache files helps.
Quote from: jjk on November 11, 2019, 21:07:31 PM
I can't reproduce that language problem. In my case VirtueMart 3.6.8 10197 language switching always loads all translated elements in the selected language.
@elanto75
When I clicked on one of the brands on the login page you linked above, my Firefox inspector initially showed many javascript errors (probably cloud loading problems).
Perhaps clearing all cache files helps.
I did what you said but nothing changed
For other users having this problem.
The bug was because a plugin loaded the vmconfig before the language was set.
So reording the system plugin so Joomla language plugin is loaded first should solve the bug.
Damn, that thing again.
Any plugins, which load/use vm files before the core is executed should load the config with
loadConfig($force = FALSE,$fresh = FALSE, $lang = true, $exeTrig = true)
and with correct parameters for that case:
loadConfig(FALSE,FALSE, false, false);
Then it will work correct. VM takes itself the already loaded config and just initialises the language and executes the trigger. I will directly add that to some dev docs tutorial.
Quote from: Studio 42 on November 22, 2019, 18:54:41 PM
For other users having this problem.
The bug was because a plugin loaded the vmconfig before the language was set.
So reording the system plugin so Joomla language plugin is loaded first should solve the bug.
Thank you, your help was really precious!
QuoteloadConfig($force = FALSE,$fresh = FALSE, $lang = true, $exeTrig = true)
This does not solve the problem in all the cases.
Actual Case:
If the plugin calls the \vmConfig::loadConfig function as a preloader (outside the plugin's main class), then the loadConfig is called during the importPlugin function, when the application loads all the plugin files (of type system). I.e. Before triggering them.
In that case the loadConfig is called before the languageCode plugin (no matter their order) and as a result sets the default language as the VM's language.
Now since you have the language as a static param in the vmText Class, it makes no difference if the Application's language is defined later by the languageCode system plugin. It is already defined for VM in the 1st call.
Question:
What if the vmText gets the current language from the application instead of using a static variable?
$lang=\Joomla\CMS\Factory::getApplication()->getLanguage();
This seems to work independently of any plugin's code.
Also why not letting the application have responsibility of it's own variables?
This is a variable that affects the state of the entire application. It is not wise to store it statically in higher level.
The plugin is not "languageCode plugin" but "System - Language Filter".
You need to order this plugin first in the list.