-- Détecte la langue locale
local L = {}
local locale = GetLocale()

-- Traductions en anglais (par défaut)
L["GuildMap"] = "GuildMap"
L["Welcome to GuildMap!"] = "Welcome to GuildMap!"
L["Show Rank"] = "Show Rank"
L["Show Level"] = "Show Level"
L["Icon Lock"] = "Lock Icon"
L["Invite"] = "Invite"
L["Whisper"] = "Whisper"
L["Cancel"] = "Cancel"
L["Icon Size"] = "Icon Size (%)"
L["GuildMap Parameter"] = "GuildMap Options"
L["Edit Parameters"] = "Edit Parameters"
L["Left Click"] = "Left click to open/close options."
L["Simple Dots"] = "Show players as simple dots"
L["displayName"] = "Show player names"
L["displayHealth"] = "Show player health"
L["NWB_Warning"] = "Members need Nova World Buffs installed to be displayed on the map."
L["ignorePlayerOnOtherLayers"] = "Ignore player who are not on your layer"
L["showPlayersLayer"] = "Show player layer (if NWB activated)"
L["showPlayersLayerTooltip"] = "Show players layer tooltip (if NWB activated)"
L["Stealth"] = "Stealth"
L["Show All Icons"] = "Show All Icons"
L["Show Minimap Icons"] = "Show Minimap Icons"
L["Map Icon Size"] = "Map Icon Size"
L["Minimap Icon Size"] = "Minimap Icon Size"
L["Health Alerts"] = "Health Alerts"
L["Low Health Alerts"] = "Low Health Alerts"
L["Health % Alert Threshold"] = "Health % Alert Threshold"
L["Ignore Duel HP Alerts"] = "Ignore Duel HP Alerts"
L["Layers Settings"] = "Layer Settings"
L["Disabled"] = "Disabled"
L["Chat Message"] = "Chat Message"
L["Raid Warning (No Sound)"] = "Raid Warning (No Sound)"
L["Dynamically change around my level"] = "Dynamically change around my level"
L["Levels below mine"] = "Levels below mine"
L["Levels above mine"] = "Levels above mine"
L["Min Level"] = "Min Level"
L["Max Level"] = "Max Level"
L["Filter level ranges to be shown on the Map and Minimap"] = "Filter level ranges to be shown on the Map and Minimap"
L["Right Click on Map Icons to invite or whisper"] = "Right Click on Map Icons to invite or whisper"
L["Wait a few seconds after enabling map icons"] = "Wait a few seconds after enabling map icons"
L["Discord: `portallz` for bugs"] = "Discord: `portallz` for bugs"
L["Core"] = "Core"
L["Extra"] = "Extra"
L["Guide\n/gm or /guildmap   --   /gm version     /gm count\n\nRight Click on Map Icons to invite or whisper\nWait a few seconds after enabling map icons"] =
"Guide\n/gm or /guildmap -- /gm version /gm count\n\nRight Click on Map Icons to invite or whisper\nWait a few seconds after enabling map icons"
L["Toggle ALL Icons"] = "Toggle ALL Icons"
L["Map Button Tooltip"] = "Map Button Tooltip"
L["GuildMap Options"] = "GuildMap Options"
L["Layer"] = "Layer"
L["Layer "] = "Layer "
L[" L"] = " L"
L["Players on Map: "] = "Players on Map: "
L["GuildMap Version: "] = "GuildMap Version: "
L["<- Join our Discord! I really need testers"]="<- Join our Discord! I really need testers"

if locale == "deDE" then
    L["GuildMap"] = "GuildMap"
    L["Welcome to GuildMap!"] = "Willkommen bei GuildMap!"
    L["Show Rank"] = "Rang anzeigen"
    L["Show Level"] = "Stufe anzeigen"
    L["Icon Lock"] = "Symbol sperren"
    L["Invite"] = "Einladen"
    L["Whisper"] = "Flüstern"
    L["Cancel"] = "Abbrechen"
    L["Icon Size"] = "Symbolgröße (%)"
    L["GuildMap Parameter"] = "GuildMap Optionen"
    L["Edit Parameters"] = "Optionen bearbeiten"
    L["Left Click"] = "Linksklick zum Öffnen/Schließen der Optionen."
    L["Simple Dots"] = "Zeige Spieler als Punkt" 
    L["displayName"] = "Spielernamen anzeigen"
    L["displayHealth"] = "Spielerleben anzeigen"
    L["NWB_Warning"] = "Mitglieder müssen Nova World Buffs installiert haben, um auf der Karte angezeigt zu werden."
    L["ignorePlayerOnOtherLayers"] = "Spieler ignorieren, die nicht auf deiner Ebene sind"
    L["showPlayersLayer"] = "Spielerebene anzeigen (wenn NWB aktiviert)"
    L["showPlayersLayerTooltip"] = "Tooltip der Spielerebene anzeigen (wenn NWB aktiviert)"
    L["Stealth"] = "Versteckt"
    L["Show All Icons"] = "Alle Symbole anzeigen"
    L["Show Minimap Icons"] = "Minimap Icons"
    L["Map Icon Size"] = "Kartensymbolgröße"
    L["Minimap Icon Size"] = "Minimap Icon anzeige"
    L["Health Alerts"] = "Gesundheitswarnungen"
    L["Low Health Alerts"] = "Warnungen bei niedrigem Leben"
    L["Health % Alert Threshold"] = "Schwellenwert für Lebenswarnung (%)"
    L["Ignore Duel HP Alerts"] = "Duelle ignorieren"
    L["Layers Settings"] = "Ebenen-Einstellungen"
    L["Disabled"] = "Deaktiviert"
    L["Chat Message"] = "Chat-Nachricht"
    L["Raid Warning (No Sound)"] = "Schlachtzugswarnung (kein Ton)"
    L["Dynamically change around my level"] = "Dynamischen Bereich um meinem Level anzeigen"
    L["Levels below mine"] = "level unter mir"
    L["Levels above mine"] = "level über mir"
    L["Min Level"] = "Mindeststufe"
    L["Max Level"] = "Höchststufe"
    L["Filter level ranges to be shown on the Map and Minimap"] = "Stufenbereich auf Karte und Minikarte filtern"
    L["Right Click on Map Icons to invite or whisper"] = "Rechtsklick auf Kartensymbole zum Einladen oder Flüstern"
    L["Wait a few seconds after enabling map icons"] = "Ein paar Sekunden warten, nachdem Kartensymbole aktiviert wurden"
    L["Discord: `portallz` for bugs"] = "Discord: `portallz` für Bugs"
    L["Core"] = "Einstellungen"
    L["Extra"] = "Extras"
    L["Guide\n/gm or /guildmap   --   /gm version     /gm count\n\nRight Click on Map Icons to invite or whisper\nWait a few seconds after enabling map icons"] =
    "Anleitung\n/gm oder /guildmap -- /gm version /gm count\n\nRechtsklick auf Kartensymbole zum Einladen oder Flüstern\nEin paar Sekunden warten, nachdem Kartensymbole aktiviert wurden"
    L["Toggle ALL Icons"] = "Alle Symbole umschalten"
    L["Map Button Tooltip"] = "Tooltip des Karten-Buttons"
    L["GuildMap Options"] = "GuildMap Optionen"
    L["Layer"] = "Ebene"
    L["Layer "] = "Ebene "
    L[" L"] = " E"
    L["Players on Map: "] = "Spieler auf der Karte: "
    L["GuildMap Version: "] = "GuildMap Version: "
    L["<- Join our Discord! I really need testers"] = "<- Trete unserem Discord bei! Ich brauche dringend Tester"
end

-- Traductions en français
if locale == "frFR" then
    L["GuildMap"] = "GuildMap"
    L["Welcome to GuildMap!"] = "Bienvenue sur GuildMap !"
    L["Show Rank"] = "Afficher le rang"
    L["Show Level"] = "Afficher le niveau"
    L["Icon Lock"] = "Verrouiller l’icône"
    L["Invite"] = "Inviter"
    L["Whisper"] = "Chuchoter"
    L["Cancel"] = "Annuler"
    L["Icon Size"] = "Taille de l’icône (%)"
    L["Edit Parameters"] = "Modifier les paramètres"
    L["Left Click"] = "Clic gauche pour ouvrir/fermer les options."
    L["Simple Dots"] = "Afficher sous forme de points simples"
    L["displayName"] = "Afficher les noms"
    L["displayHealth"] = "Afficher la vie"
    L["NWB_Warning"] = "Les membres doivent avoir Nova World Buffs installé et activé pour être affichés sur la carte."
    L["ignorePlayerOnOtherLayers"] = "Ignorer les joueurs qui ne sont pas sur votre couche"
    L["showPlayersLayer"] = "Afficher la couche du joueur (si NWB est activé)"
    L["showPlayersLayerTooltip"] = "Afficher les informations de couche du joueur (si NWB est activé)"
    L["Stealth"] = "Camouflage"
    L["Show All Icons"] = "Afficher toutes les icônes"
    L["Show Minimap Icons"] = "Afficher les icônes de la minicarte"
    L["Map Icon Size"] = "Taille des icônes de la carte"
    L["Minimap Icon Size"] = "Taille des icônes de la minicarte"
    L["Health Alerts"] = "Alertes de vie"
    L["Low Health Alerts"] = "Alertes de vie faible"
    L["Health % Alert Threshold"] = "Seuil d’alerte de vie (%)"
    L["Ignore Duel HP Alerts"] = "Ignorer les alertes de duel"
    L["Layers Settings"] = "Paramètres des couches"
    L["Disabled"] = "Désactivé"
    L["Chat Message"] = "Message de discussion"
    L["Raid Warning (No Sound)"] = "Avertissement de raid (sans son)"
    L["Dynamically change around my level"] = "Changer dynamiquement selon mon niveau"
    L["Levels below mine"] = "Niveaux en dessous du mien"
    L["Levels above mine"] = "Niveaux au-dessus du mien"
    L["Min Level"] = "Niveau minimum"
    L["Max Level"] = "Niveau maximum"
    L["Filter level ranges to be shown on the Map and Minimap"] = "Filtrer les plages de niveaux affichées sur la carte et la minicarte"
    L["Right Click on Map Icons to invite or whisper"] = "Clic droit sur les icônes de la carte pour inviter ou chuchoter"
    L["Wait a few seconds after enabling map icons"] = "Attendez quelques secondes après avoir activé les icônes de la carte"
    L["Discord: `portallz` for bugs"] = "Discord : `portallz` pour signaler des bugs"
    L["Core"] = "Principal"
    L["Extra"] = "Supplémentaire"
    L["Guide\n/gm or /guildmap   --   /gm version     /gm count\n\nRight Click on Map Icons to invite or whisper\nWait a few seconds after enabling map icons"] =
    "Guide\n/gm ou /guildmap -- /gm version /gm count\n\nClic droit sur les icônes de la carte pour inviter ou chuchoter\nAttendez quelques secondes après avoir activé les icônes de la carte"
    L["Toggle ALL Icons"] = "Basculer TOUTES les icônes"
    L["Map Button Tooltip"] = "Info-bulle du bouton de la carte"
    L["GuildMap Options"] = "Options de GuildMap"
    L["Layer"] = "Couche"
    L["Layer "] = "Couche "
    L[" L"] = " C"
    L["Players on Map: "] = "Joueurs sur la carte : "
    L["GuildMap Version: "] = "Version de GuildMap : "
    L["<- Join our Discord! I really need testers"] = "<- Rejoignez notre Discord ! J'ai vraiment besoin de testeurs"
end

if locale == "esES" or locale == "esMX" then
    L["GuildMap"] = "GuildMap"
    L["Welcome to GuildMap!"] = "¡Bienvenido a GuildMap!"
    L["Show Rank"] = "Mostrar rango"
    L["Show Level"] = "Mostrar nivel"
    L["Icon Lock"] = "Bloquear icono"
    L["Invite"] = "Invitar"
    L["Whisper"] = "Susurrar"
    L["Cancel"] = "Cancelar"
    L["Icon Size"] = "Tamaño del icono (%)"
    L["Edit Parameters"] = "Editar parámetros"
    L["Left Click"] = "Haz clic izquierdo para abrir/cerrar las opciones."
    L["Simple Dots"] = "Mostrar como puntos simples"
    L["displayName"] = "Mostrar nombres"
    L["displayHealth"] = "Mostrar salud"
    L["NWB_Warning"] = "Los miembros deben tener Nova World Buffs instalado y activado para mostrarse en el mapa."
    L["ignorePlayerOnOtherLayers"] = "Ignorar jugadores que no estén en tu capa"
    L["showPlayersLayer"] = "Mostrar la capa del jugador (si NWB está activado)"
    L["showPlayersLayerTooltip"] = "Mostrar información de la capa del jugador (si NWB está activado)"
    L["Stealth"] = "Sigilo"
    L["Show All Icons"] = "Mostrar todos los iconos"
    L["Show Minimap Icons"] = "Mostrar iconos del minimapa"
    L["Map Icon Size"] = "Tamaño del icono del mapa"
    L["Minimap Icon Size"] = "Tamaño del icono del minimapa"
    L["Health Alerts"] = "Alertas de salud"
    L["Low Health Alerts"] = "Alertas de baja salud"
    L["Health % Alert Threshold"] = "Umbral de alerta de salud (%)"
    L["Ignore Duel HP Alerts"] = "Ignorar alertas para duelos"
    L["Layers Settings"] = "Ajustes de capas"
    L["Disabled"] = "Desactivado"
    L["Chat Message"] = "Mensaje de chat"
    L["Raid Warning (No Sound)"] = "Aviso de banda (sin sonido)"
    L["Dynamically change around my level"] = "Cambiar dinámicamente según mi nivel"
    L["Levels below mine"] = "Niveles debajo del mío"
    L["Levels above mine"] = "Niveles encima del mío"
    L["Min Level"] = "Nivel mínimo"
    L["Max Level"] = "Nivel máximo"
    L["Filter level ranges to be shown on the Map and Minimap"] = "Filtra los rangos de nivel que se mostrarán en el mapa y el minimapa"
    L["Right Click on Map Icons to invite or whisper"] = "Haz clic derecho en los iconos del mapa para invitar o susurrar"
    L["Wait a few seconds after enabling map icons"] = "Espera unos segundos después de activar los iconos del mapa"
    L["Discord: `portallz` for bugs"] = "Discord: 'portallz' para reportar errores"
    L["Core"] = "Principal"
    L["Extra"] = "Adicional"
    L["Guide\n/gm or /guildmap   --   /gm version     /gm count\n\nRight Click on Map Icons to invite or whisper\nWait a few seconds after enabling map icons"] = "Guía\n/gm o /guildmap -- /gm version /gm count\n\nHaz clic derecho en los iconos del mapa para invitar o susurrar\nEspera unos segundos después de activar los iconos del mapa"
    L["Toggle ALL Icons"] = "Alternar todos los iconos"
    L["Map Button Tooltip"] = "Tooltip del botón del mapa"
    L["GuildMap Options"] = "Opciones de GuildMap"
    L["Layer"] = "Capa"
    L["Layer "] = "Capa "
    L[" L"] = " C"
    L["Players on Map: "] = "Jugadores en el mapa: "
    L["GuildMap Version: "] = "Versión de GuildMap: "
    L["<- Join our Discord! I really need testers"] = "<- ¡Únete a nuestro Discord! Realmente necesito probadores"
end

if locale == "ptBR" then
    L["GuildMap"] = "GuildMap"
    L["Welcome to GuildMap!"] = "Bem-vindo ao GuildMap!"
    L["Show Rank"] = "Mostrar posto"
    L["Show Level"] = "Mostrar nível"
    L["Icon Lock"] = "Bloquear ícone"
    L["Invite"] = "Convidar"
    L["Whisper"] = "Sussurrar"
    L["Cancel"] = "Cancelar"
    L["Icon Size"] = "Tamanho do ícone (%)"
    L["Edit Parameters"] = "Editar parâmetros"
    L["Left Click"] = "Clique esquerdo para abrir/fechar as opções"
    L["Simple Dots"] = "Mostrar como pontos simples"
    L["displayName"] = "Mostrar nomes"
    L["displayHealth"] = "Mostrar vida"
    L["NWB_Warning"] = "Os membros precisam ter o Nova World Buffs instalado e ativado para aparecerem no mapa"
    L["ignorePlayerOnOtherLayers"] = "Ignorar jogadores que não estejam na sua camada"
    L["showPlayersLayer"] = "Mostrar a camada do jogador (se NWB estiver ativado)"
    L["showPlayersLayerTooltip"] = "Mostrar informações da camada do jogador (se NWB estiver ativado)"
    L["Stealth"] = "Furtividade"
    L["Show All Icons"] = "Mostrar todos os ícones"
    L["Show Minimap Icons"] = "Mostrar ícones do minimapa"
    L["Map Icon Size"] = "Tamanho do ícone do mapa"
    L["Minimap Icon Size"] = "Tamanho do ícone do minimapa"
    L["Health Alerts"] = "Alertas de vida"
    L["Low Health Alerts"] = "Alertas de vida baixa"
    L["Health % Alert Threshold"] = "Limite de alerta de vida (%)"
    L["Ignore Duel HP Alerts"] = "Ignorar alertas em duelos"
    L["Layers Settings"] = "Configurações de camadas"
    L["Disabled"] = "Desativado"
    L["Chat Message"] = "Mensagem no bate-papo"
    L["Raid Warning (No Sound)"] = "Aviso de raide (sem som)"
    L["Dynamically change around my level"] = "Alterar dinamicamente de acordo com meu nível"
    L["Levels below mine"] = "Níveis abaixo do meu"
    L["Levels above mine"] = "Níveis acima do meu"
    L["Min Level"] = "Nível mínimo"
    L["Max Level"] = "Nível máximo"
    L["Filter level ranges to be shown on the Map and Minimap"] = "Filtre os intervalos de nível exibidos no mapa e no minimapa"
    L["Right Click on Map Icons to invite or whisper"] = "Clique com o botão direito nos ícones do mapa para convidar ou sussurrar"
    L["Wait a few seconds after enabling map icons"] = "Aguarde alguns segundos após ativar os ícones do mapa"
    L["Discord: `portallz` for bugs"] = "Discord: `portallz` para reportar erros"
    L["Core"] = "Principal"
    L["Extra"] = "Extra"
    L["Guide\n/gm or /guildmap   --   /gm version     /gm count\n\nRight Click on Map Icons to invite or whisper\nWait a few seconds after enabling map icons"] = "Guia\n/gm ou /guildmap -- /gm version /gm count\n\nClique com o botão direito nos ícones do mapa para convidar ou sussurrar\nAguarde alguns segundos após ativar os ícones do mapa"
    L["Toggle ALL Icons"] = "Alternar TODOS os ícones"
    L["Map Button Tooltip"] = "Dica do botão do mapa"
    L["GuildMap Options"] = "Opções do GuildMap"
    L["Layer"] = "Camada"
    L["Layer "] = "Camada "
    L[" L"] = " C"
    L["Players on Map: "] = "Jogadores no mapa: "
    L["GuildMap Version: "] = "Versão do GuildMap: "
    L["<- Join our Discord! I really need testers"] = "<- Junte-se ao nosso Discord! Eu realmente preciso de testadores"
end



-- Fonction globale pour accéder aux traductions
function GuildMap_Localize(key)
    return L[key] or key
end
