com.softicar.platform.common.core.locale.ILocale Maven / Gradle / Ivy
Show all versions of platform-common Show documentation
package com.softicar.platform.common.core.locale;
import com.softicar.platform.common.core.i18n.LanguageEnum;
import java.text.SimpleDateFormat;
/**
* Interface for locale configuration.
*
* @author Oliver Richers
*/
public interface ILocale {
/**
* Returns the {@link LanguageEnum} to be used for translations.
*
* @return the {@link LanguageEnum} to use (never null)
*/
LanguageEnum getLanguage();
/**
* Returns the {@link String} to be used as decimal separator.
*
* Common values are the decimal comma (,) or decimal point (.).
*
* This separator must be different to the separator returned by
* {@link #getDigitGroupSeparator()}.
*
* @return the decimal separator (never null and not empty)
*/
String getDecimalSeparator();
/**
* Returns the {@link String} to be used as separator for digit groups.
*
* Common values are space ( ), comma (,), point (.) or apostrophe (') or
* the empty {@link String}.
*
* This separator must be different to the separator returned by
* {@link #getDecimalSeparator()}.
*
* @return the decimal separator (never null but may be empty)
*/
String getDigitGroupSeparator();
/**
* Returns the {@link String} to use as a date format, in
* {@link SimpleDateFormat} compliant syntax.
*
* @return the date format (never null and not empty)
*/
String getDateFormat();
}