Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Change Label SmartGwtMessages_fr.properties

    Hello,

    First of all, please forgive my english which is not very good.

    I'm developping an application with smartgwt.
    The people who i am working for don't like the error message that is display when they make a mistake editing a float field.

    This text is define in the file SmartGwtMessages_fr.properties --> validator_notADecimal

    Is it possible to change this text without change the .jar file?
    I also want to avoid to make a package com.smartgwt...i18n and add my own SmartGwtMessages_fr.properties file.

    thanks in advance,

    Gregory

    #2
    If the message you're trying to alter is non product specific, you can update the french translation for this label on the 99translationsproject page.

    Alternatively wire in your own translations :

    Code:
    package com.mycompany.client.i18n;
    
    public class CutomizedSgwtMessages extends com.smartgwt.client.i18n.SmartGwtMessages {
        //override button_title
        String button_title();
    }
    
    
    CutomizedSgwtMessages.properties
    button_title=My Title
    
    CutomizedSgwtMessages_fr.properties
    button_title=foo bar
    
    
    //In your startup code call
    
    CutomizedSgwtMessages myMessages = GWT.create(CutomizedSgwtMessages);
    
    I18nUtil.initMessages(myMessages);
    If you just want to hardcode the translation regardless of locale then have a look at code in 118nUtils.initMessages(..). Write a JSNI snipped setting the value for validator_notADecimal

    Comment

    Working...
    X