VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: hhtmp88 on December 25, 2014, 17:46:29 PM

Title: New Language Constants: Will they be overwritten when VM being upgraded?
Post by: hhtmp88 on December 25, 2014, 17:46:29 PM
Dear all,

I tried to add the following new shopper fields:
COM_VIRTUEMART_USER_CHINESE_FULLNAME="中文姓名" , which means "Chinese Full Name"
COM_VIRTUEMART_USER_HOME_DISTRICT="居住地區", which means "Home District"
COM_VIRTUEMART_USER_WORK_DISTRICT="工作地區", which "Work District"
-> and updated the language file (~/language/zh-TW/zh-TW.com_virtuemart.ini) so that they can be displayed correctly in Traditional Chinese

I wonder if these added New Language Constants will be overwritten when VM being upgraded?
-> If yes, are there any ways to avoid?
-> with method similar to language overrides thru Language manager?

Thanks for any kind of help!
Title: Re: New Language Constants: Will they be overwritten when VM being upgraded?
Post by: bluezeyes on December 26, 2014, 01:19:07 AM
Hello,
Instead of adding it to the language files, I would prefer to add  language override in joomla language manager.
Just choose the admin language when creating a new override and set the checkbox.  , in both,
Or the best way contribute to the transiflex team a and it there  to the language files where it's missing.

Kind regards
Title: Re: New Language Constants: Will they be overwritten when VM being upgraded?
Post by: hhtmp88 on December 26, 2014, 04:21:25 AM
Quote from: bluezeyes on December 26, 2014, 01:19:07 AM
Hello,
Instead of adding it to the language files, I would prefer to add  language override in joomla language manager.
Just choose the admin language when creating a new override and set the checkbox.  , in both,
Or the best way contribute to the transiflex team a and it there  to the language files where it's missing.

Kind regards
Am I right that Language Overrides requires that the language constants must be first existed in the current language files?
-> note that the above 3 language constants do not exist in the current language file  (~/language/zh-TW/zh-TW.com_virtuemart.ini)
Title: Re: New Language Constants: Will they be overwritten when VM being upgraded?
Post by: bluezeyes on December 26, 2014, 22:15:12 PM
No they don't need to exist first in the language files.  They cover any existing language string in the files,  so even they do not exist.
Second,  any update will not result in loss of your edits when you use overrides.
Only the language pack has to be installed and the content language Id has to be set.
Title: Re: New Language Constants: Will they be overwritten when VM being upgraded?
Post by: hhtmp88 on December 27, 2014, 04:42:33 AM
Quote from: bluezeyes on December 26, 2014, 22:15:12 PM
No they don't need to exist first in the language files.  They cover any existing language string in the files,  so even they do not exist.
Second,  any update will not result in loss of your edits when you use overrides.
Only the language pack has to be installed and the content language Id has to be set.
Wow.......Thanks BlueZeyes!
-> I rename back the original file: "zh-TW.com_virtuemart.ini"
-> and sucessfully added the concerned three language constants using the overrides interface of Language manager:
COM_VIRTUEMART_USER_CHINESE_FULLNAME="中文姓名"
COM_VIRTUEMART_USER_HOME_DISTRICT="居住地區"
COM_VIRTUEMART_USER_WORK_DISTRICT="工作地區"