play.ext.i18n.Format.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of play-i18n_2.11 Show documentation
Show all versions of play-i18n_2.11 Show documentation
Messaging localization plugin for the Play framework 2
package play.ext.i18n
import play.api.Configuration
/** supported format, suffix represents file suffix */
protected[i18n] case class Format(name: String, suffix: Option[String], loader: MessagesLoader) {
def isEnabled(implicit config: Configuration) = config.get[Boolean](name)
def toSuffix = suffix.map("." + _).getOrElse("")
}