Create global resource bundle
This commit is contained in:
parent
47d53d4df8
commit
ac182c10c0
@ -29,6 +29,7 @@ class WillowApplication : Application() {
|
||||
private const val FONT_SIZE = 12.0
|
||||
|
||||
private const val JDBC_CONNECTION_STRING = "jdbc:sqlite:dictionary.db"
|
||||
val resourceBundle: ResourceBundle = ResourceBundle.getBundle("i18n/willow", Locale.US)
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
@ -45,7 +46,7 @@ class WillowApplication : Application() {
|
||||
val model = Model(searchService, findWordsService)
|
||||
|
||||
val fxmlLoader = FXMLLoader()
|
||||
fxmlLoader.resources = ResourceBundle.getBundle("i18n/willow", Locale.US)
|
||||
fxmlLoader.resources = resourceBundle
|
||||
fxmlLoader.controllerFactory = Callback { type ->
|
||||
when (type) {
|
||||
MainController::class.java -> MainController(model)
|
||||
|
Loading…
Reference in New Issue
Block a user