init
This commit is contained in:
commit
c5ee4e27e6
131 files changed
+9926
No files matched your search
@@ -0,0 +1,3 @@
|
||||
# Common Module
|
||||
|
||||
The common module contains shared enums and utilities used across most OpenMMO modules.
|
||||
@@ -0,0 +1,4 @@
|
||||
plugins {
|
||||
id("buildsrc.convention.kotlin-jvm")
|
||||
id("buildsrc.convention.spotless")
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package de.fiereu.openmmo.common.enums
|
||||
|
||||
enum class Language(
|
||||
val code: String,
|
||||
private val english: String,
|
||||
private val display: String
|
||||
) {
|
||||
EN("en", "english", "English"),
|
||||
FR("fr", "french", "Français"),
|
||||
DE("de", "german", "Deutsch"),
|
||||
ES("es", "spanish", "Español"),
|
||||
PT("pt", "portuguese", "Português"),
|
||||
IT("it", "italian", "Italiano"),
|
||||
NL("nl", "dutch", "Nederlands"),
|
||||
PL("pl", "polish", "Polski"),
|
||||
EL("el", "greek", "Eλληνικá"),
|
||||
TR("tr", "turkish", "Türkçe"),
|
||||
FIL("fil", "filipino", "Filipino"),
|
||||
RU("ru", "russian", "Русский"),
|
||||
KO("ko", "korean", "한국어"),
|
||||
JA("ja", "japanese", "日本語"),
|
||||
CN("cn", "chinese", "简体中文"),
|
||||
OTHER("other", "other", "Other"),
|
||||
;
|
||||
|
||||
companion object {
|
||||
private val codeMap = entries.associateBy { it.code }
|
||||
|
||||
fun fromCode(code: String): Language {
|
||||
return codeMap[code] ?: OTHER
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user