# Localization

object Localization
Content copied to clipboard

Handles localization of strings using java ResourceBundles.

Message property files should reside in `src/main/resources` named `messages_locale.properties`, where `locale` is formatted as returned by Locale.toString.

## Functions

get
Link copied to clipboard
fun get(locale: Locale, key: String): String
Content copied to clipboard
Returns the localized string for key
fun get(locale: Locale, key: String, vararg args: Pair<String, Any?>): String
Content copied to clipboard
Additionally formats the localized string with the named args, which are represented as `{argumentName}` in the translations

## Properties

localeProvider
Link copied to clipboard
var localeProvider: (Player) -> Locale
Content copied to clipboard
This function determines which locale is used for a player, by default Locale.US is always returned.