News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Translation problem

Started by thefbi, June 29, 2022, 17:08:42 PM

Previous topic - Next topic

thefbi

Hi,
I just update a shop to VM 4.0.2 10661 to a Joomla 3.10.10.
I have some problem with the category module and also the VMuikit (I use Yoothem Pro + VMuikit).

I have 3 languages in my shop. French (as default) + EN + DE.
When i change the language, to DE for example, the title of the VM cat module change, but not the category text. Also, the main category stay in french. All the other part of the site it in DE (cart, other Joomla modules, etc), except the VM cat.

So i dont know if it is related to this update or other.

Any idea ?

Jumbo!

It is probably a cache issue. Try this.

Open - modules/mod_virtuemart_category/mod_virtuemart_category.php

Find the following codes in line 73:

echo $cache->get( array( 'mod_virtuemart_category', 'displayCatsMod' ), array($module, $params, $active_category_id, $category_id, $layout));

Replace the above by:

echo $cache->get( array( 'mod_virtuemart_category', 'displayCatsMod' ), array($module, $params, $active_category_id, $category_id, $layout, JFactory::getLanguage()->getTag()));

Now check if it helps.

thefbi

Thank you, but it dos not solve the problem.

thefbi

I see the same problem in the my account pages. It seem VM will not switch the language. It is a big problem.

thefbi

In fact, for the categories, it is the titles that do not translate. However, the links of the titles (to the categories) are in the chosen language.

thefbi

#5
New edit : When i am on the homepage and switch the language, nothing of VM change. But as already said, the links are good. If i click a link, and go to the category view, the left module switch to the good language. The category title on the category view page still in french.

All of that is very strange.

EDIT Again : I have desactivated the url rewrite. I reactivate it = The problem of category left module come back. Even if i click on a link, it still in french. There is a big bug with VM and languages...

jjk

I don't have a language switching problem with my bilingual shop VM 10658. Which php version do you use? Php 8 can produce problems in language files, which are not updated to the latest versions. In order to make the language files compatible to strict php8, we recently needed to replace a number of placeholders like "%1s", "%2s", %ds" to read "%1$s", "%2$s", "%d$s".
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

thefbi


jjk

#8
I suppose your multilanguage configuration is not yet complete.
It looks like you didn't rename the htaccess.txt in the root directory to .htaccess yet.

Switching between French and German currently seems to work on your website, but English language configuration is missing one or more settings.
Look at your current urls:
lampedesign.ch/index.php/
lampedesign.ch/index.php/de-de/
lampedesign.ch/index.php/en/

Also have a look at the language settings of the menu modules and the menu item language associations.

Most likely not related to your language switcher problem, but you should also have a look at some errors:
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

thefbi

#9
Hello,
Thank you.

How do you know it's lampedesign.ch? I didn't mention it...

For the translations, no, the German doesn't work, I did it manually. I created a custom module with the text links of the categories, since VM doesn't do it.

I did the same with the category page of VMuikit. So in fact, it's a DIY.

For the English, the client hasn't translated the texts yet, so they stay in French, which is normal.

And yes, the .htaccess is there on the server. This site has been working very well for several years without any problems with the translation.

Thanks for the console error, i will try to take a look.

jjk

#10
Quote from: thefbi on July 02, 2022, 20:56:05 PM
How do you know it's lampedesign.ch? I didn't mention it...

I was browsing through your old forum posts to see if you ever posted a link to the site.  ;)

Anyway, looking at it again, I'm pretty sure the custom modules holding the VM category links are related to the problem and probably cause the router/language switcher to fail in certain cases.

I would suggest to use the 'standard' setup for multilingual VM shops. For each language create a menu module holding the VM categories. There should be a one menu item pointing to a VM category, which is set as a top level category, set to 'Default page' = 'Yes'  and 'Show Categories' in the second configuration tab set to 'Yes'. This simulates the old 'VM frontpage' used in very old VM versions. Below that you can create menu items for each individual shop category.

Your frontpage design is pretty similar to my own website kiekebusch.com (using an old template but with VM 4.0.4, not officially released yet), where the language switching works without problems since many years.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

thefbi

OK, thank you.
I have several sites on VM, but indeed for the language problem, it's this one :)

I had not made the custom modules with my text links before having the problem... If that's what you mean.
But I'll try to start from the beginning, according to your idea, and I'll see if it works or not.

thefbi

#12
Hi,

I have now duplicated the site to do my tests. I upgraded to Joomla 4, which is what this is all about. And now, it's even better!

The categories only display the same one! I'm going to pull out my hair soon.

See my screenshots. The categories module (and the links of the categories homepage) have all taken the same link, to a single category. Extraordianary !

PS: I tested by making only menu links in "standard" multilanguage as explained, but it does not change anything.

thefbi


thefbi

What I'll do now:
- install J4 and VM4 on a new, blank installation.
- Create the multilanguage and test
- IF OK => install Yootheme pro + VMuikit and test
- If OK => see to migrate the database with categories, products, etc

I come back later with reslults