Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions

error message in Chinese


Reply

3 Posts   1003 Views

Avatar
leafchild

18 June 2011 at 11:16am Community Member, 41 Posts

My web site has 3 languages: English, Japanese and Chinese.

There are form page and English and Japanese error message is showing fine but Chinese page still show English message,

ex)
Chinese page - "电邮" is required.
"is required" should be in Chinese

When I edit _config.php adding code bellow.
Japanese error message immediately start showing.

_config.php

======================================================
Translatable::set_allowed_locales(array(
'en_US', //US English
'ja_JP', //Japanese
'zh_yue' //Chinese (Cantonese)
)
);

Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');
======================================================

What do I need to do to show Chinese(zh_yue) error message?

Avatar
Invader_Zim

18 June 2011 at 9:15pm Community Member, 141 Posts

Hi leafchild.

Not quite sure, but i think this is happening, because there are no language files for
'zh_yue' (have a look at /sapphire/lang and /cms/lang dirs). So the default messages are shown.

You could change 'zh_yue'//Chinese (Cantonese) to 'zh_CN'//Chinese (China) and check if the correct error message appears.
If so, you might have to create a language file for zh_yue (... and share it with us :-))

Cheers
Christian

Avatar
leafchild

21 June 2011 at 6:01am Community Member, 41 Posts

Thanks, Invader_Zim

Actually, I already created both file and place to the directory:"sapphire/lang/zh_YUE.php" and "cms/lang/zh_YUE.php"

I copied form zh_CH.php file and inside of file replace all "zh_Ch" to "zh_YUE" but
the error message is still same.