All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.marid.fx.i18n.I18n.kt Maven / Gradle / Ivy

There is a newer version: 0.9.8.10
Show newest version
package org.marid.fx.i18n

import org.marid.fx.extensions.pref
import java.lang.Thread.currentThread
import java.util.*
import java.util.ResourceBundle.Control.FORMAT_PROPERTIES
import java.util.ResourceBundle.Control.getControl
import java.util.ResourceBundle.getBundle

object I18n {

  private val control = getControl(FORMAT_PROPERTIES)
  fun textsBundle(): ResourceBundle = getBundle("texts", locale.get(), currentThread().contextClassLoader, control)

  val locale = pref("locale", Locale.getDefault())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy