Skip to content

Commit

Permalink
Get locale correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Oct 30, 2024
1 parent 72d10be commit a3efa22
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package foundation.esoteric.minecraft.plugins.library.messages

import foundation.esoteric.minecraft.plugins.library.file.FileManagedPlugin
import org.apache.commons.lang3.LocaleUtils
import org.bukkit.configuration.file.YamlConfiguration
import java.io.File
import java.util.Locale
Expand All @@ -28,7 +27,7 @@ class MessageManager(plugin: FileManagedPlugin) {

private fun loadMessages() {
for (file in messagesFolder.listFiles()!!) {
val locale = LocaleUtils.toLocale(file.name.removeSuffix(".yml"))
val locale = Locale.forLanguageTag(file.name.removeSuffix(".yml"))

val map = HashMap<String, String>()

Expand Down

0 comments on commit a3efa22

Please sign in to comment.