News:

Looking for documentation? Take a look on our wiki

Main Menu

[SOLVED] How to show products in one language in multilanguage Joomla

Started by pawlik, November 10, 2013, 13:32:34 PM

Previous topic - Next topic

pawlik

Hello all,

I have a little bit different question.

I succesfully set multilanguage Joomla, I have menus, categories and content for all languages I need.

But problem is that I need to show Virtuemart products, located in one default product dabase for all languages.

Generally, I would need to change just system language in the front-end (so customers can see all system strings in their language e.g. cart instructions, button labels, description fields of the registration form etc.) but they will see product on one language.

I need to to this because of few thing:
1. I have really lot of products (more than 25.000) and I need to update them very often (prices, stock-level etc.)
2. There is just sku, title and short description, which are in english however but it is not neccessary to translate it, because everyone over the world will know, what is buying and I do not need to have all 25.000 product duplicated in other languages (and to update them in all other databases..)

When I use multilingual Joomla, I will see these product for default language, but when I click to different language, there is nothing, obviously.

Is there any option to show products for all (as it is possible to set e.g. for specified joomla articles, categories or menus and modules) ?

Thank you in advance - this would save me a lot of time with product updates.

Joomla 2.5.14
Virtuemart 2.0.24
Domain: it is not public so far, I can provide login details through PM

Thank you

Best regards
PK

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

pawlik

Quote from: Maxim Pishnyak on November 10, 2013, 16:29:36 PM
Try invaluable tool - CSVI.

Thank you for quick response.

It is not solving my problem, however. I am already using tool for import/export, but different (because I have XML files), the thing was to avoid importing for each language separately. E.g. to make update of products on English and then show it to the any customer no matter which language of the core he/she selects. So, to KEEP system translation, but to show just products in english database tables.

Because system will use like 10 languages, it means for me to have to prepare 10 separate cron jobs for product updates (it will use the same XML file - as I do not have translation of the products titles or descriptions and I do not need it), which will start cron update for 10 XML files and will update 250.000 products in final - instead of just one file with 25.000 products..

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

pawlik

So, finally I have solved this issue.

If anyone needs to make the similar procedure (it is quite long for describing now) just PM me or post a reply here and I will write it down.

Maxim Pishnyak

You could post your solution, but I warned you in my previous post.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

pawlik

Quote from: Maxim Pishnyak on November 11, 2013, 22:31:48 PM
You could post your solution, but I warned you in my previous post.

Hello Max, so there is a solution (and yes, I am aware about SEO  :-[ - but I have not recognized a problem so far  8) ):

I have wrote this for: b*******2 also.

FOR ALL - KEEP IN MIND MAX'S WARNING, please. I cannot guarantee anything.

There are four steps that have to be done:
1. Settign of the Virtuemart (just language setting)
2. Right configuration of the multilingual Joomla (core plugin) - no hacks, just configuration in plugin settings
3. Import of products etc.
4. Right configuration of the menu items (propriete language linking) that lead to the virtuemart category and products

If there were doubts about compatibility or something - I am using Joomla 2.5.14 and Virtuemart 2.0.24, PHP 5.3.27 + my own template that has no additional code or hack to change Virtuemart performance.

I suppose you have empty Virtuemart

I would recommend to backup your Joomla instalation and database. Nobody knows and backup is always important, isn't it ..  ;)

----------------------------------------

ad 1/
So lets make changes in Virtuemart
Virtuemart -> Configuration -> Shop - Language settings
Because I want to use Products + Categories in just one language for whole world, I have set my default language here (Czech in my case)
// I have XML from supplier and I have made changes to better importing through my component. Prodcust and Categories I have have english names, categories, and description - its meaning is the same for all countries but it may not be good for everyone who needs to do the same as me (e.g. if they have products, categories and description in their local language and it has no meaning in other languages..)

Summary:
Your Virtuemart is using just one language in language settings

ad 2/
Joomla Language plugin settings

Got to Extensions -> Plug-in Manager - (find or search for:) -> Language Filter (System)

You can keep all setting as you preffered - i just set the Remove URL Language Code to NO - I am not sure if it has influence, but it adds selected language code to URL that is good for me

ad 3/
Clear cache and import products

Before I imported my XML file, I cleared system cache and Purged Expired Cache (when I tested my import file for a few times and then deleted products and categories, sometimes system remember URLS and product IDs)
You can make this in Site -> Maintenance -> Clear Cache and Site -> Maintenance -> Purge Expired Cache

Then I imported products, categories, SKU, Descriptions, Prices, and custom fields from my XML file via my import component - all is stored in one selected language database of Virtuemart (Czech in my case)
I have also set a cron job for updates, supplier updates XML file on server and it is working so far..

ad 4/
Right configuration of menu items
// Note 1: I am not using any plugin or module to do this. I set it manually in Joomla manager
// Note 2: I suppose you set all menus, modules, articles etc. asit is described in Joomla docs.. You do not need to change this. Just following:

So now I have linked my menus with Virtuemart:

I have two menus - main menu that is linked to component and and second, vertical menu that is linked through aliases to main menu items (I would highly recommend this, If you want to have more menus in front-end)

Each menu has its own language, so I have one main menu in English, one in Czech, on in German etc. - generally I follow joomla docs for multilanguage setting

The difference is, that I changed menu item alias in all languages except default one.

E.g.:
Czech main menu has menu item:
Menu Item type -> Virtuemart -> Front Page
Menu Title -> Produkty // title is in Czech
Menu alias -> produkty
.
.
.
Language -> Čeština (CS)

English Language main menu item:
Menu Item type -> Virtuemart -> Front Page
Menu Title -> Products // title is in English
Menu alias -> produkty // alias is the same as in czech menu item
.
.
.
Language -> English

German language main menu item:
English Language main menu item:
Menu Item type -> Virtuemart -> Front Page
Menu Title -> Produkte // title is in German
Menu alias -> produkty // alias is the same as in czech menu item
.
.
.
Language -> English

All other menus and sub-menus I linked through aliases leads to required Virtuemart category (and there is just one category for all languages) and there is a just language setting for menu item to and show only once imported products, categories etc. in all languages..

SEO is set in default in English.

All links look like this:

www.mysiteurl.tld/cs/produkty/category-name1/product-title // in Czech
www.mysiteurl.tld/en/produkty/category-name1/product-title // in English
www.mysiteurl.tld/de/produkty/category-name1/product-title // in German
etc.

I would also note for all that THIS WAS NOT a VIRTUEMART ISSUE! Virtuemart is working as it should, its multilanguage setting IS GREAT!

This was caused just because of:
- my client wants
- I was iddle to import 10 times more products and then to set all linkings - moreover it is not neccessary at all
- I would like to not overload my server each 20 minutes with importing or updating of 10 times more products than it was neccessary

Obviously, if there were products and categories etc. for each language, I would have to do that as it is usual and recommended.

If there was something lost in translation (as I am not english native), please let me know.

//EDIT: Just spellcheck