Jump to:

22996 Posts in 11844 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Question about language & email

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2
Go to End
Author Topic: 2524 Views
  • Foulensois
    Avatar
    Community Member
    13 Posts

    Re: Question about language & email Link to this post

    Welcome Startup3D with this translation problem.

    We ve got nothing in these files (I checked only 2.2.3)

  • StartUp3D
    Avatar
    Community Member
    10 Posts

    Re: Question about language & email Link to this post

    @tobych: I´m using version 2.3.0 (stable)

    Greetings,
    Otto

  • tobych
    Avatar
    Community Member
    97 Posts

    Re: Question about language & email Link to this post

    Okay, well I did some searching myself, I was curious about this. I Googled for [silverstripe "please fill out"] and found this Blog post:

    http://www.webmasterbulletin.net/2008/07/silverstripe-form-validation-translation/78

    I also searched the source (the head of the SVN trunk) for "Please fill out" and found the string in sapphire/javascript/Validator.js:

    var errorMessage = ss.i18n.sprintf(ss.i18n._t('VALIDATOR.FIELDREQUIRED', 'Please fill out "%s", it is required.'), fieldLabel);

    It seems 2.3.0 includes translation of the string. Foulensois is using 2.2.3, and Otto 2.3.0.

    The code is http://open.silverstripe.org/browser/modules/sapphire/trunk/javascript/Validator.js on line 159 (in changeset 72811)

    My search of the source came up with the "Please fill out" string in sapphire/javascript/lang/en_US.js.

    Looking at the file for French, fr_FR, I see the translation:

    'VALIDATOR.FIELDREQUIRED': 'Veuillez remplir "%s", c\'est un champ requis.',

    The French file was added in time for 2.3.0, as far as I understand.

    So Foulensois, if you want the translation in 2.2.3, you'll need to patch the code to match 2.3.0, or just change the string in Validator.js. Easiest to just patch that file, but of course it'd probably be best just to upgrade to 2.3.0.

    Otto, if you're not seeing translation, I don't know what's going on.

    And maybe Homesite is not searching for the string in JavaScript files? Maybe just HTML?

    If I'm missing something here, sorry!

    Toby

  • StartUp3D
    Avatar
    Community Member
    10 Posts

    Re: Question about language & email Link to this post

    Thank you tobych, now i found it! I just tried my Editor-Search again and although js-files should be searched, Homesite still doesn´t find that string. Finally i can change that line!

    Following up-Question: Can someone tell me where to set the language-variable, so that the German "de_DE.js" is loaded, instead of "en_US.js"?

    Greetings,
    Otto

  • tobych
    Avatar
    Community Member
    97 Posts

    Re: Question about language & email Link to this post

    StartUp3D, I think I answered this question earlier in this thread:

    http://www.silverstripe.org/general-questions/show/254105?start=0#post254396

  • martimiz
    Avatar
    Forum Moderator
    1038 Posts

    Re: Question about language & email Link to this post

    Stupid me - I cannot remove this post, that I never meant to submit in the first place - sorry for that

    2524 Views
Page: 1 2
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.