Example usage for java.util Locale ENGLISH

List of usage examples for java.util Locale ENGLISH

Introduction

In this page you can find the example usage for java.util Locale ENGLISH.

Prototype

Locale ENGLISH

To view the source code for java.util Locale ENGLISH.

Click Source Link

Document

Useful constant for language.

Usage

From source file:net.eledge.android.toolkit.db.internal.SQLBuilder.java

public static String getFieldName(Field field, Column column) {
    return StringUtils.defaultIfBlank(column.name(), field.getName().toLowerCase(Locale.ENGLISH));
}

From source file:be.ceau.chart.enums.FontStyle.java

private FontStyle() {
    this.serialized = name().toLowerCase(Locale.ENGLISH);
}

From source file:com.github.sebhoss.contract.verifier.impl.ErrorMessageConfiguration.java

/**
 * @return English error messages/*from  w ww  . ja v a 2  s . c  om*/
 */
@Bean
@SuppressWarnings(CompilerWarnings.STATIC_METHOD)
public IMessageConveyor english() {
    return new MessageConveyor(Locale.ENGLISH);
}

From source file:Main.java

public static String DateMessage(Date d, Context c) {
    DateFormat df = DateFormat.getDateTimeInstance();
    DateFormat dfS = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
    DateFormat dfM = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
    DateFormat dfL = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
    DateFormat dfF = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);

    DateFormat dfNoTime = DateFormat.getDateInstance();
    DateFormat dfSNoTime = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ENGLISH);
    DateFormat dfMNoTime = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH);
    DateFormat dfLNoTime = DateFormat.getDateInstance(DateFormat.LONG, Locale.ENGLISH);
    DateFormat dfFNoTime = DateFormat.getDateInstance(DateFormat.FULL, Locale.ENGLISH);
    DateFormat dfDevice = android.text.format.DateFormat.getDateFormat(c);

    String s = dfDevice.format(d) + " or \n" + dfS.format(d) + " or \n" + dfM.format(d) + " or \n"
            + dfL.format(d) + " or \n" + dfF.format(d);

    return s;//from   w w w  .  j ava2 s.c  o  m

}

From source file:caillou.company.clonemanager.gui.customComponent.menubar.MenuBarController.java

@FXML
private void changeToEnglish(ActionEvent event) throws Exception {
    SpringFxmlLoader.changeLocale(Locale.ENGLISH);
    MainApp.getInstance().replaceSceneContent(SpringFxmlLoader.getLastLoadedURL(), null, null);
}

From source file:net.canadensys.dataportal.occurrence.config.OccurrencePortalConfigTest.java

@Test
public void testConfigLoading() {
    //ensure locales are loaded
    assertEquals(2, occurrencePortalConfig.getSupportedLocale().size());
    assertNotNull(occurrencePortalConfig.getResourceBundle(Locale.ENGLISH));

    assertEquals("cc0",
            occurrencePortalConfig.getLicenseShortName("http://creativecommons.org/publicdomain/zero/1.0/"));
}

From source file:com.salesmanager.core.util.LocaleUtil.java

public static Locale getLocale(String lang) {

    if (StringUtils.isBlank(lang)) {
        return getDefaultLocale();
    }// w  w  w  .  j  a v  a  2  s .  c  o m

    if (lang.equals(Constants.ENGLISH_CODE)) {
        return Locale.ENGLISH;
    } else if (lang.equals(Constants.FRENCH_CODE)) {
        return Locale.FRENCH;
    } else {
        log.warn("Resources for this language " + lang + " may not be handled by this system");
        return new Locale(lang);
    }

}

From source file:be.ceau.chart.enums.PointStyle.java

private PointStyle() {
    StringBuilder sb = new StringBuilder();
    for (String s : name().split("_")) {
        if (sb.length() == 0) {
            sb.append(s.toLowerCase(Locale.ENGLISH));
        } else {/*from w  w  w  .j a  v a 2 s.c o  m*/
            sb.append(s.substring(0, 1).toUpperCase(Locale.ENGLISH));
            sb.append(s.substring(1).toLowerCase(Locale.ENGLISH));
        }
    }
    this.serialized = sb.toString();
}

From source file:Main.java

public static Date FormatDate(String sRecDate, Context c) {
    DateFormat df = DateFormat.getDateTimeInstance();
    DateFormat dfS = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
    DateFormat dfM = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
    DateFormat dfL = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
    DateFormat dfF = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);

    DateFormat dfNoTime = DateFormat.getDateInstance();
    DateFormat dfSNoTime = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ENGLISH);
    DateFormat dfMNoTime = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH);
    DateFormat dfLNoTime = DateFormat.getDateInstance(DateFormat.LONG, Locale.ENGLISH);
    DateFormat dfFNoTime = DateFormat.getDateInstance(DateFormat.FULL, Locale.ENGLISH);
    DateFormat dfDevice = android.text.format.DateFormat.getDateFormat(c);

    Date dRecDate = null;//www.  j  a v  a 2  s . c o m

    try {
        dRecDate = dfDevice.parse(sRecDate);
    } catch (ParseException e) {
        try {
            dRecDate = df.parse(sRecDate);
        } catch (ParseException e2) {

            try {
                dRecDate = dfS.parse(sRecDate);
            } catch (ParseException e3) {

                try {
                    dRecDate = dfM.parse(sRecDate);
                } catch (ParseException e4) {

                    try {
                        dRecDate = dfL.parse(sRecDate);
                    } catch (ParseException e5) {

                        try {
                            dRecDate = dfF.parse(sRecDate);
                        } catch (ParseException e6) {

                            try {
                                dRecDate = dfNoTime.parse(sRecDate);
                            } catch (ParseException e7) {

                                try {
                                    dRecDate = dfSNoTime.parse(sRecDate);
                                } catch (ParseException e8) {

                                    try {
                                        dRecDate = dfMNoTime.parse(sRecDate);
                                    } catch (ParseException e9) {

                                        try {
                                            dRecDate = dfLNoTime.parse(sRecDate);
                                        } catch (ParseException e10) {

                                            try {
                                                dRecDate = dfFNoTime.parse(sRecDate);
                                            } catch (ParseException e11) {

                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return dRecDate;

}

From source file:net.eledge.android.toolkit.db.internal.SQLBuilder.java

public static String getTableName(Class<?> clazz) {
    Entity entity = clazz.getAnnotation(Entity.class);
    return StringUtils.defaultIfBlank(entity.name(), clazz.getName().toLowerCase(Locale.ENGLISH));
}