Package play.i18n

Class Langs

  • @Singleton
    public class Langs
    extends Object
    Manages languages in Play
    • Constructor Detail

      • Langs

        public Langs​(play.api.i18n.Langs langs)
    • Method Detail

      • availables

        public List<Lang> availables()
        The available languages.

        These can be configured in {$code application.conf}, like so:

         play.i18n.langs = ["fr", "en", "de"]
        The available languages.
      • preferred

        public Lang preferred​(Collection<Lang> candidates)
        Select a preferred language, given the list of candidates.

        Will select the preferred language, based on what languages are available, or return the default language if none of the candidates are available.

        candidates - The candidate languages
        The preferred language
      • asScala

        public play.api.i18n.Langs asScala()
        the Scala version for this Langs.