VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: MarioP on April 07, 2014, 14:20:10 PM

Title: Recommend to a friend language change in VM 2.6.0
Post by: MarioP on April 07, 2014, 14:20:10 PM
Hi, I have a multilanguage site and I need to change some language constant text from Recommend to a friend form:
Your Name, Friend's Email and the predefined e-mail message "Hi! I found this on (website name) and thought you might like it! Check it out now!"
Where will I find the file where I can change the text ?
Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: jjk on April 07, 2014, 19:45:35 PM
Search for COM_VIRTUEMART_RECOMMEND_COMMENT in the frontend language file ...\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini. But I would suggest to test if your required change works placing it in the Joomla language override files/folders.
Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: MarioP on April 08, 2014, 09:28:14 AM
Thank you. I've followed to your advice and placed the text in Joomla language override files. Works great ;)
Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: gcarne on June 30, 2014, 02:54:59 AM
Further on the same topic:

The language constants COM_VIRTUEMART_RECOMMEND_PRODUCT and COM_VIRTUEMART_RECOMMEND_MAIL_BODY start with "%s". In my system the first %s does not get filled (the second %s is correctly filled with the product name) and the email header and message in the mail look weird. It is neither filled for a guest, nor for a logged in customer and I suppose it is in both cases to be filled with a name. Where is this taken from? How can I insure it gets filled, not only for a logged on customer, but also for a guest?

The first %s must be filled with something relating to the sender, otherwise it will, apart from looking weird, look like spam.

VM 2.6.6
Joomla 2.5.19

Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: jjk on June 30, 2014, 10:14:12 AM
Quote from: gcarne on June 30, 2014, 02:54:59 AM
In my system the first %s does not get filled

In which language? If you are using English, please check if you have two versions of the frontend (approx. 34 kb) language file. One (new) at:
your-root-folder\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini
and another (old) one at: your-root-folder\language\en-GB\en-GB.com_virtuemart.ini

English language files have been moved from the Joomla default language folders to the component/module/plugin folders some time ago. So perhaps your system is still loading an old language file. You can enable 'Debug System' and 'Debug language' in Joomla configuration in order to see which language files are loaded.
Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: gcarne on July 01, 2014, 10:06:51 AM
Site is bilingual DE/EN. Am testing DE which is the first language for the site. An upgrade was recently done from 2.0.26d to 2.6.6.

The loaded files shown in debug after sending Recommend-to-Friend are:

JROOT/language/de-DE/de-DE.com_virtuemart.ini which includes:

   COM_VIRTUEMART_RECOMMEND_PRODUCT="%s empfehlen Ihnen: %s"  -  this one appears to be used for the email header with the first %s not found and the second %s with the correct product name in DE

JROOT/components/com_virtuemart/language/en-GB/en-GB.com_virtuemart.ini which includes:

   COM_VIRTUEMART_RECOMMEND_MAIL_BODY="%s recommend you %s out of our online shop"  -  this one appears to be used for the email body without the first %s not found and the second filled with the correct product name in DE
   COM_VIRTUEMART_RECOMMEND_PRODUCT="%s recommends you: %s"

Q1) Directory JROOT/components/com_virtuemart/language only has the directory en-GB. Should it not also have a de-DE with the relevant DE-files and if so, where can I get them?

Q2) Is not something missing from the first %s, quite regardless of whether a language file is missing or not? It looks like it should be filled with a name. In my template for the pop-up Recommend-to-friend there is no field for a name. Should there be one?
Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: gcarne on July 02, 2014, 11:12:41 AM
I just installed the latest language pack for DE. Nothing changed though. The email subject is in German (correct) but is incomplete because the first %s is not filled/substituted and the email body is in English (false) with the product name in German (correct) and is incomplete because of the first %s.

URL www.sleepinsilk.de (http://www.sleepinsilk.de).

Can anyone help?
Title: Re: Recommend to a friend language change in VM 2.6.0
Post by: gcarne on July 04, 2014, 00:39:54 AM
RESOLVED  Manually moved the language files to the correct place.