VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: csho on July 26, 2014, 12:30:10 PM

Title: Add default language products to all languages
Post by: csho on July 26, 2014, 12:30:10 PM
Is there any way when I create a new product, that product to be saved in all languages automatically? I don't want add each language individually it's a waste of time (image if i had a multilingual site with 20 languages.. o.O)
Or even better to add translate tags/strings like the custom field method (http://forum.virtuemart.net/index.php?topic=96758.0)
Thanks in advance.

I use VM 2.6
Title: Re: Add default language products to all languages
Post by: jjk on July 26, 2014, 23:45:06 PM
If you expect that VM translates your product descriptions into 20 languages automatically, the answer is No. If you add a new product for example in English (when English is your default site language), a copy of the english product description is automatically saved in all other languages which are installed and selected in VM, but you have to translate the text yourself.
Title: Re: Add default language products to all languages
Post by: csho on July 28, 2014, 10:38:50 AM
Quote from: jjk on July 26, 2014, 23:45:06 PM
If you expect that VM translates your product descriptions into 20 languages automatically, the answer is No. If you add a new product for example in English (when English is your default site language), a copy of the english product description is automatically saved in all other languages which are installed and selected in VM, but you have to translate the text yourself.

Of course I don't want it to be automatically.
When I create a product and save it in English, exists only in English language. In order to be saved in other languages I have to click on the language button on the top left and copy paste the content again. :/

I also instead of copy-pasting content I have static tables as description that I only need to translate. I was wondering if it can be done with tags as the above link that I posted

Title: Re: Add default language products to all languages
Post by: jjk on July 28, 2014, 17:25:34 PM
Can you provide an example screenshot of what your static tables look like? Maybe what you need is the built-in 'VM - Custom, product specification' plugin. If this is enabled in your Joomla plugin manager, you can create such custom fields if you go in VirtueMart Administration to Products > Custom Fields > Select 'New' > Select 'Custom Field Type' "Plug-ins" > 'Select a plug-in' "VM - Custom, product specification".

QuoteIn order to be saved in other languages I have to click on the language button on the top left and copy paste the content again. :/
If you enter a new description in English and click on 'Save' the english description initially should be copied to the other language descriptions, without having to copy it manually. If this doesn't work in your case, something in your language configuration might be wrong. Also, which Editor do you use? (I would recommend to use JCE, which works fine with VirtueMart)
Title: Re: Add default language products to all languages
Post by: jooomlaa on July 30, 2014, 16:17:57 PM
I have the same problem. For a long time I had started the shop in German with over 3600 products and 5.500 categories. Then i add the english language and copied the _de_de tables to _en_gb table. Now I need many more languages. But I can not click and translate each product and each category. VM must use the English table as standard. As long as I, for example, a category have not been translated, it is not even displayed in the language. The Shop in this new language ist empty for this time.
It is surely not difficult to tell the program: If for product X in #_virtuemart_products_es_es no record exists, then take the record from #_virtuemart_products_en_gb (same with vm_category ...)?
If I have a product in 30 languages ​​and later wants to change a product than I have to do 30 times(!) for each product, although it would be sufficient in the default english.
If I have 30 languages​​, I have every language table create 30 times as a complete copy of the English table and have such a large amount of redundant data. What an elegant data handling?

Here you can see the build-project: http://central.zweimassenschwungrad.com. On bottom can find a temporary language switcher. EN and DE works fine as a complete redundant copy. For FR I have translate one category via VM and only this one is shown. The other language versions ​​are empty because not translated / copied.
Title: Re: Add default language products to all languages
Post by: Milbo on July 30, 2014, 22:36:58 PM
Quote from: jooomlaa on July 30, 2014, 16:17:57 PM
It is surely not difficult to tell the program: If for product X in #_virtuemart_products_es_es no record exists, then take the record from #_virtuemart_products_en_gb (same with vm_category ...)?

It is, else it would be there. I spent on that topic already around 20 hours. No joke. The real trouble is todo that without performance loss, or better said.. only losing performance if it is need.

It is a typical case for our membership. For two silver memberships I can sit another day and complete it.
Title: Re: Add default language products to all languages
Post by: jjk on July 31, 2014, 00:14:31 AM
@Jooomlaa
I think for what you are trying to achieve, you should have used the built-in VirtueMart 'Specification' plugin and a set of custom field translations. But if you want to change that now, you would have to re-enter/re-design all your product descriptions. So Milbo's suggestion to buy a membership and in return receive an initial fix for your problem probably is the quickest and cheapest solution.
Title: Re: Add default language products to all languages
Post by: jooomlaa on July 31, 2014, 08:47:41 AM
@milbo: Thank you for your response. first of all: You're doing a good job.
I've also programmed parts for the VM core that was taken (manufacturer discount). It is indeed always involves a lot of time.

Your remarks on perfomance are understandable. Possibly you can English as the default activate via checkbox with optional warning to performance losses (like the other existing checkbox for default-english-use).
Perhaps the performance losses are not so great when you for it does not have as many redundate language data.

@jjk / milbo:
I have the website up and down read but have not found how to become a silver membership(??!!). Please send me a link for more information and registration.
Title: Re: Add default language products to all languages
Post by: jjk on July 31, 2014, 09:34:32 AM
Quote from: jooomlaa on July 31, 2014, 08:47:41 AM
Please send me a link for more information and registration.
It's right in front of you  ;) - just click on the 'member' link in the signature below Milbo's reply to you.
Title: Re: Add default language products to all languages
Post by: jooomlaa on July 31, 2014, 13:44:04 PM
okay. now i have silver membership - and now?
Title: Re: Add default language products to all languages
Post by: Milbo on July 31, 2014, 15:42:08 PM
You get a pn, cause I need you as tester. I also remind you. It was a good patch. or just contact me via skype if you have still my contact. Then I can explain it in my native tongue.
Title: Re: Add default language products to all languages
Post by: Milbo on August 14, 2014, 02:12:17 AM
soo, looks nice.
But as usual,.. you start with one feature and directly need the next.

Atm all vmtables have the fallback.
The browsing of products and categories have the FB. Inclusive the search
the getParentList for breadcrumbs is using it,
and getNeighboured product is not using it. It was too complex. It still uses the select language.

Title: Re: Add default language products to all languages
Post by: csho on August 14, 2014, 15:18:57 PM
Quote from: Milbo on August 14, 2014, 02:12:17 AM
soo, looks nice.
But as usual,.. you start with one feature and directly need the next.

Atm all vmtables have the fallback.
The browsing of products and categories have the FB. Inclusive the search
the getParentList for breadcrumbs is using it,
and getNeighboured product is not using it. It was too complex. It still uses the select language.

I don't understand, is something fixed in the new version? :P
Title: Re: Add default language products to all languages
Post by: GJC Web Design on August 14, 2014, 15:34:44 PM
yes - works really well!  will be released shortly I assume - but have tested on latest J3.3.3/VM2.9.9

If no translations are set falls back to the base language entries
Title: Re: Add default language products to all languages
Post by: csho on August 19, 2014, 10:07:54 AM
Quote from: GJC Web Design on August 14, 2014, 15:34:44 PM
yes - works really well!  will be released shortly I assume - but have tested on latest J3.3.3/VM2.9.9

If no translations are set falls back to the base language entries

I use 2.6.0 version of virtuemart and haven't updated because I made a ton of alteration in the core for my needs, which I have forgoten - lost count - since then.
Is it possible to overwrite specific files in order to make this fixed when the version is released?
Title: Re: Add default language products to all languages
Post by: GJC Web Design on August 19, 2014, 10:14:40 AM
so raise your hack count by another factor of.......  ;)

Would it not be better to bite the bullet - find a doc your hacks and prepare to upgrade to VM3 ? who knows  - a large % of your hacks may already be core in VM3
Title: Re: Add default language products to all languages
Post by: csho on August 19, 2014, 13:05:13 PM
Quote from: GJC Web Design on August 19, 2014, 10:14:40 AM
so raise your hack count by another factor of.......  ;)

Would it not be better to bite the bullet - find a doc your hacks and prepare to upgrade to VM3 ? who knows  - a large % of your hacks may already be core in VM3

Prepare to V3? I would really think about it first... the process from vm1.x to vm2.x was a pure disaster that cost me many days to get the fixes done from the official -free- bugged migration script.
So... I'd better stick to this version for now I guess, patching the existing setup suits me better cause the upgrade has been done not long ago.
Title: Re: Add default language products to all languages
Post by: GJC Web Design on August 19, 2014, 15:22:44 PM
Just for info - have migrated nearly all my own sites to 2.9.9 (the nearly VM3)

all were completely straight forward joomla extensions installs from Vm 2.0.20 thru to 2.6.x versions
these are just updates - not migrations as 1.1 -> 2.0 are

I know the early 1.1 to 2.0 were fairly scary propositions but once your in VM2.0 these later updates are a doddle

VM3 will run on J2.5  so no Joomla platform change is nescesary