News:

Support the VirtueMart project and become a member

Main Menu

Categories do not redirect in multilingual mode

Started by sicogary, March 16, 2013, 22:08:31 PM

Previous topic - Next topic

sicogary

Hello all,

I am having a problem with the Vituemart Multilingual Shop. It works fine on the default language (English) but when you select Spanish the links to the categories within the shop don't redirect properly.

You can see the shop at:

http://t-reeds.com/index.php/en/shop

All the categories redirect right in here but when you select the Spanish language they don't.

Example:

English:
Accesories Link: http://t-reeds.com/index.php/en/shop/accessories

That's ok.

Spanish
Accesorios Link: http://t-reeds.com/index.php/es/comp...rt/?Itemid=719

It should be: http://t-reeds.com/index.php/es/tienda/accesorios

Thank you very much for your time.

sicogary

#1
Hello,

I have worked it out my self with the help of sparkx. Here you can find his post.

What I had to do, is to simply change the main menu Shop from English language to All as VirtueMart seems to look for the All language when you translate the categories.

sparkx talks about creating a new All language menu and later unpublising it. But that did not work for me. Instead, it was working before unpublishing but then English and ALL menus appeared duplicated.

I think, this is a bug from Virtuemart. I am using Joomfish 2.5.1 and it created the menus in the first place just having English and Spanish in my menu list. It would be awesome if someone of the developers can change VirtueMart to take the reference menu as the default (in my case English) and not the language All.

Hope this help in the future.

P.S.: I initially posted this issue here.

jjk

This has nothing to do with VirtueMart. A menu item defined as default homepage and assigned to language "All" is a Joomla requirement as described in the Joomla multilanguage tutorial: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf. The Joomla language switcher depends on menu items. So if switching languages doesn't work, there usually is something wrong with your menu configuration. Switching languages in VirtueMart frontend views is identical to doing so in Joomla. When you are looking at 'Product X' in 'Category A' in Spanish and switch to English, it looks for a menu item 'Category A' in English. If it doesn't find that, the Joomla language switcher will fall back to the next higher level for which it finds a menu item in English, which might be your homepage.

However, I don't know if Joomfish has any influence on the behavior of Joomla and/or VirtueMart language switching. I don't use it for my bilingual shop, as I don't see any advantage using an additional language manager.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

sadrem

p.s. Do not forget to change message icon to Solved.

lindapowers

#4
If you assign a menu item to "all" that menu item will have the same name in every language which is no use at all.

Actually what Joomla says it that you should have just one "main menu item" to all.

IMO The correct way is with menu associations, also VM is missing some code that automatically creates this associations but I completely disagree that you need a menu assigned to all languages.

Also assigning a menu "shop" to all wont work if you use template clones per language.

Each product in virtuemart has an association as they get translated, it just needs some coding I ignore to tell the system to redirect to each product or category when you change language.

Regards

lindapowers

Quote from: sadrem on May 09, 2013, 12:46:25 PM
Hello,
How did You achieve product translation?
http://t-reeds.com/index.php/es/tienda3/39/pro-custom-oboe-reeds-detail/pro-custom-oboe-reeds-detail?limitstart=0&limit=int&showall=1

Did You build menu item for every product and used association ?
Thank You in advance

Yes, if you look at his top menu shop that is what he has done, create menu items for each product and language associations, something hopefully VM will do in the future automatically.

sadrem

Thank You for reply. But it's not working for me.
I have
Main Menu : home-all menu item (default menu item for all languages, type featured articles go to Uncategorised category articles)
English menu :
home-English (default menu item for English language, type featured articles go to English category)
shop - go to vm front page english only

Russian menu : home-Russian  (default menu item for Russian  language, type featured articles go to Russian category)
shop - go to vm front page russian only

template per language.

When I'm on product page and change language I'm going to home page of another language.

Can You suggest me what to change?
p.s. Do not forget to change message icon to Solved.

lindapowers

Quote from: sadrem on May 09, 2013, 21:14:44 PM
Thank You for reply. But it's not working for me.
I have
Main Menu : home-all menu item (default menu item for all languages, type featured articles go to Uncategorised category articles)
English menu :
home-English (default menu item for English language, type featured articles go to English category)
shop - go to vm front page english only

Russian menu : home-Russian  (default menu item for Russian  language, type featured articles go to Russian category)
shop - go to vm front page russian only

template per language.

When I'm on product page and change language I'm going to home page of another language.

Can You suggest me what to change?


As mentioned you will need to create a menu item id for each product and use the language associations in the menu parameters.