DeflatedPickle/FAOSDance

View on GitHub
src/main/kotlin/com/deflatedpickle/faosdance/util/Lang.kt

Summary

Maintainability
A
0 mins
Test Coverage
package com.deflatedpickle.faosdance.util

import java.util.*

object Lang {
    private val inputStream = GlobalValues.langProperties.inputStream()
    private val properties = Properties()

    val locale: Locale
    val bundle: ResourceBundle

    init {
        properties.load(inputStream)
        Locale.setDefault(Locale.UK)

        locale = Locale(properties.getProperty("LANGUAGE"), properties.getProperty("REGION"))
        bundle = ResourceBundle.getBundle("lang/", locale)
    }
}