Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » error message in Chinese

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 991 Views
  • leafchild
    Community Member
    41 Posts

    error message in Chinese Link to this post

    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,

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

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


    '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?

  • Invader_Zim
    Community Member
    141 Posts

    Re: error message in Chinese Link to this post

    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 )


  • leafchild
    Community Member
    41 Posts

    Re: error message in Chinese Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.