List of usage examples for java.util Locale GERMANY
Locale GERMANY
To view the source code for java.util Locale GERMANY.
Click Source Link
From source file:com.mobileman.projecth.web.service.LocaleService.java
/** * @return gender.unknown/*from w ww .j a v a2 s . com*/ */ public String getUnknowMessage() { String unkn = messageSource.getMessage("gender.unknown", null, Locale.GERMANY); return unkn; }
From source file:org.openhie.openempi.util.ConvertUtilTest.java
public void testGetInternationalDatePattern() { LocaleContextHolder.setLocale(new Locale("nl")); assertEquals("dd-MMM-yyyy", DateUtil.getDatePattern()); LocaleContextHolder.setLocale(Locale.FRANCE); assertEquals("dd/MM/yyyy", DateUtil.getDatePattern()); LocaleContextHolder.setLocale(Locale.GERMANY); assertEquals("dd.MM.yyyy", DateUtil.getDatePattern()); // non-existant bundle should default to default locale LocaleContextHolder.setLocale(new Locale("fi")); String fiPattern = DateUtil.getDatePattern(); LocaleContextHolder.setLocale(Locale.getDefault()); String defaultPattern = DateUtil.getDatePattern(); assertEquals(defaultPattern, fiPattern); }
From source file:com.mobileman.projecth.web.service.LocaleService.java
/** * @return location.unknown//from www . j av a 2 s . co m */ public String getUnknownLocation() { String unkn = messageSource.getMessage("location.unknown", null, Locale.GERMANY); return unkn; }
From source file:com.gisgraphy.util.DateUtilTest.java
@Test public void testGetInternationalDatePattern() { LocaleContextHolder.setLocale(new Locale("nl")); assertEquals("dd-MMM-yyyy", DateUtil.getDatePattern()); LocaleContextHolder.setLocale(Locale.FRANCE); assertEquals("dd/MM/yyyy", DateUtil.getDatePattern()); LocaleContextHolder.setLocale(Locale.GERMANY); assertEquals("dd.MM.yyyy", DateUtil.getDatePattern()); // non-existant bundle should default to default locale LocaleContextHolder.setLocale(new Locale("fi")); String fiPattern = DateUtil.getDatePattern(); LocaleContextHolder.setLocale(Locale.getDefault()); String defaultPattern = DateUtil.getDatePattern(); assertEquals(defaultPattern, fiPattern); }
From source file:de.awtools.lang.TranslatorTest.java
@Test public void testDefaultLocale() { Locale germany = new Locale("de", "DE"); assertThat(germany).isEqualTo(Locale.GERMANY); Locale german = new Locale("de"); assertThat(german).isEqualTo(Locale.GERMAN); }
From source file:de.perdian.commons.lang.conversion.impl.converters.TestNumberToStringConverter.java
@Test public void testConvertWithPatternAndLocaleDE() { NumberToStringConverter converter = new NumberToStringConverter("0.0", new SimpleLocaleContext(Locale.GERMANY)); Assert.assertEquals("42,0", converter.convert(Integer.valueOf(42))); }
From source file:com.mobileman.projecth.web.service.LocaleService.java
/** * @param intValue//from ww w. ja v a2 s.c om * @return age.group. */ public String getAgeGroupMessage(int intValue) { String result = messageSource.getMessage("age.group." + intValue, null, Locale.GERMANY); return result; }
From source file:de.perdian.commons.lang.conversion.impl.converters.TestDateToStringConverter.java
@Test public void testConvertWithPatternAndLocaleDE() { Date sourceDate = new Date(1362736759873L); DateToStringConverter converter = new DateToStringConverter("EEEE", new SimpleLocaleContext(Locale.GERMANY)); Assert.assertEquals("Freitag", converter.convert(sourceDate)); }
From source file:de.fhws.ifactory.api.utils.UserCSVToRequestTransformer.java
@Override protected UserViewModel transformCSVRecordToModel(CSVRecord record) { // ###(csv_headers) You can edit below this line ### final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(this.datePattern); formatter.withLocale(Locale.GERMANY); final UserViewModel model = new UserViewModel(); model.setFirstName(record.get("firstName")); model.setLastName(record.get("lastName")); model.setRole(Integer.parseInt(record.get("role"))); model.setIsGuest(Integer.parseInt(record.get("isGuest"))); model.setId(Integer.parseInt(record.get("id"))); model.setEmail(record.get("email")); return model; // ###(csv_headers) You can edit above this line ### }
From source file:de.fhws.ifactory.api.utils.SessionCSVToRequestTransformer.java
@Override protected SessionViewModel transformCSVRecordToModel(CSVRecord record) { // ###(csv_headers) You can edit below this line ### final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(this.datePattern); formatter.withLocale(Locale.GERMANY); final SessionViewModel model = new SessionViewModel(); model.setId(Integer.parseInt(record.get("id"))); model.setSecret(record.get("secret")); return model; // ###(csv_headers) You can edit above this line ### }