News:

Support the VirtueMart project and become a member

Main Menu

New Language Constants: Will they be overwritten when VM being upgraded?

Started by hhtmp88, December 25, 2014, 17:46:29 PM

Previous topic - Next topic

hhtmp88

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!
JMY(晉明夷)
http://mfyoga.org -- Mindfulness Yoga Association 靜觀瑜伽協會
http://yogajm.com -- YogaJM 晉明瑜伽
http://jinmy.me -- JMY 晉明日誌
http://jm3ime.com -- JinMing 3-Key Chinese Input Method 晉明三鍵輸入法

bluezeyes

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

hhtmp88

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)
JMY(晉明夷)
http://mfyoga.org -- Mindfulness Yoga Association 靜觀瑜伽協會
http://yogajm.com -- YogaJM 晉明瑜伽
http://jinmy.me -- JMY 晉明日誌
http://jm3ime.com -- JinMing 3-Key Chinese Input Method 晉明三鍵輸入法

bluezeyes

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.

hhtmp88

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="工作地區"
JMY(晉明夷)
http://mfyoga.org -- Mindfulness Yoga Association 靜觀瑜伽協會
http://yogajm.com -- YogaJM 晉明瑜伽
http://jinmy.me -- JMY 晉明日誌
http://jm3ime.com -- JinMing 3-Key Chinese Input Method 晉明三鍵輸入法