# 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

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
Content copied to clipboard
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
hashCode
Link copied to clipboard
open fun hashCode(): Int
Content copied to clipboard
toString
Link copied to clipboard
open fun toString(): String
Content copied to clipboard

## 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.