Skip to content

Commit 1fa306f

Browse files
Ignore tag casing on byTag method
1 parent 955876a commit 1fa306f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/kotlin/cc/wordview/gengolex/Language.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ enum class Language(val tag: String, val dictionaryName: String, val tokenizer:
2828
@Throws(LanguageNotFoundException::class)
2929
fun byTag(tag: String): Language {
3030
for (lang in Language.entries) {
31-
if (lang.tag == tag) return lang
31+
if (lang.tag == tag.lowercase()) return lang
3232
}
3333

3434
throw LanguageNotFoundException("Unable to find a language for the tag: $tag")

0 commit comments

Comments
 (0)