trait I18n extends AnyRef
- Alphabetic
- By Inheritance
- I18n
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def autosetLanguage(availableLanguages: String*): Unit
Sets current language automatically based on the matching of the "Accept-Language" header against the list of given languages.
Sets current language automatically based on the matching of the "Accept-Language" header against the list of given languages. The languages should have corresponding files
i18n/language.po
in classpath (the language should be in IETF BCP 47 format).If there's no match, the language is still the default "en".
- lazy val browserLanguages: List[LanguageRange]
- returns
List of Locale.LanguageRange sorted by priority from high to low
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def language: String
Default language is "en".
- def language_=(language: String): Unit
Sets current language manually.
Sets current language manually. The language should have a corresponding file
i18n/language.po
in classpath (the language should be in IETF BCP 47 format). - def locale: Locale
The locale corresponding to the language.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def t(singular: String, args: Any*): String
formatLocal
using the current locale. - def t(singular: String): String
- def tc(ctx: String, singular: String, args: Any*): String
formatLocal
using the current locale. - def tc(ctx: String, singular: String): String
- def tcn(ctx: String, singular: String, plural: String, n: Long, args: Any*): String
formatLocal
using the current locale. - def tcn(ctx: String, singular: String, plural: String, n: Long): String
- def tn(singular: String, plural: String, n: Long, args: Any*): String
formatLocal
using the current locale. - def tn(singular: String, plural: String, n: Long): String
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()