--[[
    DreamHouse - Localization
    Multi-language support for the addon
    
    Default: German (deDE)
    Supported: English (enUS/enGB)
]]

local addonName, DreamHouse = ...

-- Localization table
local L = {}
DreamHouse.L = L

-- Get client locale
local locale = GetLocale()

-- ============================================
-- GERMAN (Default)
-- ============================================
local deDE = {
    -- General
    ["Favorites"] = "Favoriten",
    ["Hotbar"] = "Schnellleiste",
    ["Settings"] = "Einstellungen",
    ["Unknown"] = "Unbekannt",
    ["Yes"] = "Ja",
    ["No"] = "Nein",
    ["Close"] = "Schließen",
    ["Save"] = "Speichern",
    ["Load"] = "Laden",
    ["Delete"] = "Löschen",
    ["Export"] = "Exportieren",
    ["Import"] = "Importieren",
    ["Refresh"] = "Aktualisieren",
    ["Clear"] = "Leeren",
    ["Cancel"] = "Abbrechen",
    
    -- Favorites
    ["Add to Favorites"] = "Zu Favoriten hinzufügen",
    ["Remove from Favorites"] = "Von Favoriten entfernen",
    ["X items marked"] = "%d Items markiert",
    ["Favorites from this category only"] = "Nur Favoriten aus dieser Kategorie",
    ["No favorites marked yet"] = "Du hast noch keine Favoriten markiert!",
    ["Click star or use context menu"] = "Klicke auf den Stern bei einem Item oder nutze das Rechtsklick-Menü.",
    ["No favorites available"] = "Keine Favoriten vorhanden!",
    ["No favorites in this category"] = "Keine Favoriten in dieser Kategorie!",
    ["Favorite set"] = "Favorit gesetzt",
    ["Favorite removed"] = "Favorit entfernt",
    ["You have X favorites"] = "Du hast %d Favoriten",
    
    -- Hotbar
    ["Empty Slot X"] = "Leerer Slot %d",
    ["Empty Slot"] = "Leerer Slot",
    ["In possession"] = "Im Besitz",
    ["Not available"] = "Nicht verfügbar",
    ["Quick place"] = "Schnell platzieren",
    ["Left-click: Place"] = "Linksklick: Platzieren",
    ["Right-click: Menu"] = "Rechtsklick: Menü",
    ["Drag: Rearrange"] = "Ziehen: Umsortieren",
    ["Right-click catalog item"] = "Rechtsklick auf Katalog-Item",
    ["-> 'Add to hotbar'"] = "-> 'Zur Schnellleiste'",
    ["Hotbar empty slot hint"] = "Im Katalog Rechtsklick auf ein Item und 'Zur Schnellleiste hinzufügen' wählen.",
    ["Remove from Hotbar"] = "Aus Schnellleiste entfernen",
    ["Add to Hotbar"] = "Zur Schnellleiste hinzufügen",
    ["Clear all slots"] = "Alle Slots leeren",
    ["Clear all items from hotbar?"] = "Alle Items aus der Schnellleiste entfernen?",
    ["Hotbar X/10 used"] = "Hotbar: %d / 10 belegt",
    ["Hotbar not available yet"] = "Hotbar noch nicht verfügbar",
    ["Item already in hotbar"] = "Item bereits in Schnellleiste",
    ["Hotbar full"] = "Schnellleiste voll!",
    
    -- Stats Panel
    ["Housing Statistics"] = "Housing Statistiken",
    ["Placed Decorations"] = "Platzierte Dekorationen",
    ["Storage Capacity"] = "Storage-Kapazität",
    ["Quick Info"] = "Schnellinfo",
    ["Editor"] = "Editor",
    ["Status"] = "Status",
    ["In Housing Area"] = "Im Housing-Bereich",
    ["Outside"] = "Außerhalb",
    ["Placed"] = "Platziert",
    ["Inactive"] = "Inaktiv",
    ["Stats Panel not available yet"] = "Stats-Panel noch nicht verfügbar",
    
    -- Tooltip Enhancer
    ["--- DreamHouse Info ---"] = "--- DreamHouse Info ---",
    ["Placement"] = "Platzierung",
    ["Indoor"] = "Innen",
    ["Outdoor"] = "Außen",
    ["Size"] = "Größe",
    ["Size_Tiny"] = "Winzig",
    ["Size_Small"] = "Klein",
    ["Size_Medium"] = "Mittel",
    ["Size_Large"] = "Groß",
    ["Size_Huge"] = "Riesig",
    ["Source"] = "Herkunft",
    ["Category"] = "Kategorie",
    ["Favorite"] = "Favorit",
    ["Type"] = "Typ",
    ["Type_Decoration"] = "Dekoration",
    ["Type_Room"] = "Raum",
    ["--- Placed ---"] = "--- Platziert ---",
    ["Locked"] = "Gesperrt",
    ["Cannot be removed"] = "Nicht entfernbar",
    
    -- Preset Manager
    ["Preset Manager"] = "Preset Manager",
    ["Save new preset"] = "Neues Preset speichern:",
    ["Saved Presets"] = "Gespeicherte Presets:",
    ["Presets"] = "Presets",
    ["Delete preset X?"] = "Preset '%s' wirklich löschen?",
    ["No items to save"] = "Keine Items zum Speichern gefunden!",
    ["Preset X saved"] = "Preset '%s' gespeichert! (%d Items)",
    ["No presets to export"] = "Keine Presets zum Exportieren",
    ["Import not implemented"] = "Import-Funktion noch nicht implementiert",
    ["Preset load not implemented"] = "Preset-Laden noch nicht vollständig implementiert (API-Abhängig)",
    
    -- Quality Filter
    ["Rarity"] = "Seltenheit",
    ["Select All"] = "Alle auswählen",
    ["Select None"] = "Keine auswählen",
    
    -- Vendor Database
    ["Vendor Database"] = "Vendor-Datenbank",
    ["No vendor open"] = "Kein Händler geöffnet",
    ["Unknown Vendor"] = "Unbekannter Händler",
    ["X new housing items from Y saved"] = "%d neue Housing-Items von %s gespeichert!",
    ["X housing items already known"] = "%s: %d Housing-Items bereits bekannt",
    ["No housing items at this vendor"] = "Keine Housing-Items bei diesem Händler",
    ["TomTom Waypoint"] = "TomTom Wegpunkt",
    ["Waypoint for X set"] = "Wegpunkt für %s gesetzt!",
    ["Vendor: X in Y"] = "Händler: %s in %s",
    ["No waypoint possible"] = "(Kein Wegpunkt möglich)",
    ["Statistics"] = "Statistiken",
    ["Items"] = "Items",
    ["Vendors"] = "Händler",
    ["Vendor database cleared"] = "Vendor-Datenbank geleert!",
    ["VendorDB Commands"] = "Befehle:",
    ["VendorDB not available"] = "Vendor-Datenbank nicht verfügbar",
    
    -- Source on Map
    ["Show source on map"] = "Quelle auf Karte zeigen",
    ["No map position available"] = "Keine Kartenposition verfügbar",
    ["Item not in database"] = "Dieses Item ist nicht in der Datenbank.",
    ["Visit vendor tip"] = "Tipp: Besuche den Händler, der dieses Item",
    ["Visit vendor tip2"] = "verkauft, um es automatisch zu erfassen!",
    ["No map position for item"] = "Für dieses Item konnte keine Kartenposition gefunden werden.",
    ["Source cannot be shown on map"] = "Die Quelle kann nicht auf der Karte angezeigt werden.",
    ["Source for X"] = "Quelle für %s",
    ["Visit vendor to save position"] = "(Besuche den Händler um die Position zu speichern!)",
    ["Content tracking not available"] = "Content-Tracking ist nicht verfügbar.",
    ["X has no known source"] = "%s hat keine bekannte Quelle.",
    ["Visit vendors to collect items"] = "(Besuche Händler um Items automatisch zu erfassen)",
    ["X is being tracked"] = "%s wird getrackt. Schau auf der Weltkarte nach dem Marker.",
    ["[DH] Mark as Favorite"] = "Als Favorit markieren",
    ["[DH] Remove Favorite"] = "Favorit entfernen",
    ["[DH] Add to Hotbar"] = "Zur Schnellleiste hinzufügen",
    ["[DH] Remove from Hotbar"] = "Aus Schnellleiste entfernen",
    ["[DH] Show source on map"] = "Quelle auf Karte zeigen",
    
    -- Debug Console
    ["Debug"] = "Debug",
    ["Entries"] = "Einträge",
    ["Output X entries to chat"] = "Alle %d Einträge in den Chat ausgeben",
    ["Ctrl+A = All, Ctrl+C = Copy"] = "Ctrl+A = Alles, Ctrl+C = Kopieren",
    ["Log cleared"] = "Log geleert",
    ["DreamHouse Debug Log"] = "DreamHouse Debug Log",
    ["End (X entries)"] = "Ende (%d Einträge)",
    ["Debug Log Export"] = "Debug Log Export - Ctrl+A, Ctrl+C zum Kopieren",
    ["Exported"] = "Exportiert",
    ["Console initialized"] = "Konsole initialisiert (Ctrl+A, Ctrl+C zum Kopieren)",
    ["-> Chat"] = "-> Chat",
    
    -- Core / Slash Commands
    ["Commands"] = "Befehle:",
    ["/dh debug"] = "/dh debug - Debug-Konsole ein/aus",
    ["/dh export"] = "/dh export - Debug-Log Export Popup",
    ["/dh stats"] = "/dh stats - Statistiken anzeigen",
    ["/dh favorites"] = "/dh favorites - Favoriten anzeigen",
    ["/dh hotbar"] = "/dh hotbar - Hotbar ein/aus",
    ["/dh vendordb"] = "/dh vendordb - Vendor-Datenbank Befehle",
    ["/dh reset"] = "/dh reset - Einstellungen zurücksetzen",
    ["/dh test"] = "/dh test - Test-Nachricht ins Log",
    ["Reset all settings?"] = "Alle DreamHouse-Einstellungen zurücksetzen?",
    ["Settings reset"] = "Einstellungen zurückgesetzt!",
    ["Unknown command"] = "Unbekannter Befehl. Nutze /dh help",
    ["X test messages written"] = "%d Test-Nachrichten ins Log geschrieben!",
    
    -- Editor Modes
    ["Mode_None"] = "Keiner",
    ["Mode_BasicDecor"] = "Basis-Deko",
    ["Mode_ExpertDecor"] = "Experten-Deko",
    ["Mode_Layout"] = "Layout",
    ["Mode_Customize"] = "Anpassen",
    ["Mode_Cleanup"] = "Aufräumen",
    ["Mode_ExteriorCustomization"] = "Außenbereich",
    
    -- Collections Tab
    ["Collections"] = "Kollektionen",
    ["Collection"] = "Kollektion",
    ["Collections Tab"] = "Kollektionen",
    ["Back to list"] = "Zurück zur Liste",
    ["No items in collection"] = "Keine Items in Kollektion",
    ["[DH] Add to Collection"] = "Zu Kollektion hinzufügen",
    ["Create new collection"] = "Neue Kollektion erstellen",
    ["Remove from collection"] = "Aus Kollektion entfernen",
    ["Confirm"] = "Bestätigen",
    ["Change icon"] = "Icon ändern",
    ["Rename collection"] = "Kollektion umbenennen",
    ["Rename"] = "Umbenennen",
    ["Enter new name"] = "Neuen Namen eingeben:",
    ["Collection Hotbar Mode"] = "Kollektions-Hotbar-Modus",
    ["Active"] = "Aktiv",
    ["Click to activate"] = "Klicken zum Aktivieren",
    ["Click to deactivate"] = "Klicken zum Deaktivieren",
    ["Ctrl+Scroll to cycle collections"] = "Strg+Mausrad zum Wechseln der Kollektionen",
    ["Set as active collection"] = "Als aktive Kollektion setzen",
    ["Remove active status"] = "Aktiv-Status entfernen",
    ["No collections available"] = "Keine Kollektionen verfügbar!",
    ["Collections not implemented"] = "Kollektionen werden in einer zukünftigen Version verfügbar sein.",
    ["Collection Sets"] = "Kollektions-Sets",
    ["Seasonal Items"] = "Saisonale Items",
    ["Limited Items"] = "Limitierte Items",
    ["Complete Sets"] = "Vollständige Sets",
    ["Incomplete Sets"] = "Unvollständige Sets",
    ["Create new collection"] = "Neue Kollektion erstellen",
    ["Click to create your first collection"] = "Klicke um deine erste Kollektion zu erstellen",
    ["No collections yet"] = "Noch keine Kollektionen",
    ["Create a collection to organize your decor"] = "Erstelle eine Kollektion um deine Dekorationen zu organisieren",
    ["Enter collection name"] = "Kollektions-Name eingeben:",
    ["Create"] = "Erstellen",
    ["Delete collection X?"] = "Kollektion '%s' wirklich löschen?",
    ["Select icon"] = "Icon wählen",
    ["More icons"] = "Mehr Icons...",
    ["Search atlas"] = "Atlas durchsuchen...",
    ["CHM active - disable first"] = "Deaktiviere bitte erst den KHM",
    ["CHM active"] = "KHM aktiv",
    ["Search collections"] = "Kollektionen durchsuchen...",
    ["Search items"] = "Items durchsuchen...",
    ["No search results"] = "Keine Treffer",
    
    -- 3D Preview
    ["3D Preview"] = "3D Vorschau",
    ["Click to show 3D model"] = "Klicken für 3D-Modell",
    
    -- Hotbar Slot Selection
    ["Select Slot"] = "Slot wählen",
    ["Slot"] = "Slot",
    ["Empty"] = "Leer",
}

-- ============================================
-- ENGLISH
-- ============================================
local enUS = {
    -- General
    ["Favorites"] = "Favorites",
    ["Hotbar"] = "Hotbar",
    ["Settings"] = "Settings",
    ["Unknown"] = "Unknown",
    ["Yes"] = "Yes",
    ["No"] = "No",
    ["Close"] = "Close",
    ["Save"] = "Save",
    ["Load"] = "Load",
    ["Delete"] = "Delete",
    ["Export"] = "Export",
    ["Import"] = "Import",
    ["Refresh"] = "Refresh",
    ["Clear"] = "Clear",
    ["Cancel"] = "Cancel",
    
    -- Favorites
    ["Add to Favorites"] = "Add to Favorites",
    ["Remove from Favorites"] = "Remove from Favorites",
    ["X items marked"] = "%d items marked",
    ["Favorites from this category only"] = "Favorites from this category only",
    ["No favorites marked yet"] = "You haven't marked any favorites yet!",
    ["Click star or use context menu"] = "Click on the star on an item or use the right-click menu.",
    ["No favorites available"] = "No favorites available!",
    ["No favorites in this category"] = "No favorites in this category!",
    ["Favorite set"] = "Favorite set",
    ["Favorite removed"] = "Favorite removed",
    ["You have X favorites"] = "You have %d favorites",
    
    -- Hotbar
    ["Empty Slot X"] = "Empty Slot %d",
    ["Empty Slot"] = "Empty Slot",
    ["In possession"] = "Owned",
    ["Not available"] = "Not available",
    ["Quick place"] = "Quick place",
    ["Left-click: Place"] = "Left-click: Place",
    ["Right-click: Menu"] = "Right-click: Menu",
    ["Drag: Rearrange"] = "Drag: Rearrange",
    ["Right-click catalog item"] = "Right-click on catalog item",
    ["-> 'Add to hotbar'"] = "-> 'Add to Hotbar'",
    ["Hotbar empty slot hint"] = "Right-click an item in the catalog and select 'Add to Hotbar'.",
    ["Remove from Hotbar"] = "Remove from Hotbar",
    ["Add to Hotbar"] = "Add to Hotbar",
    ["Clear all slots"] = "Clear all slots",
    ["Clear all items from hotbar?"] = "Remove all items from the hotbar?",
    ["Hotbar X/10 used"] = "Hotbar: %d / 10 used",
    ["Hotbar not available yet"] = "Hotbar not available yet",
    ["Item already in hotbar"] = "Item already in hotbar",
    ["Hotbar full"] = "Hotbar full!",
    
    -- Stats Panel
    ["Housing Statistics"] = "Housing Statistics",
    ["Placed Decorations"] = "Placed Decorations",
    ["Storage Capacity"] = "Storage Capacity",
    ["Quick Info"] = "Quick Info",
    ["Editor"] = "Editor",
    ["Status"] = "Status",
    ["In Housing Area"] = "In Housing Area",
    ["Outside"] = "Outside",
    ["Placed"] = "Placed",
    ["Inactive"] = "Inactive",
    ["Stats Panel not available yet"] = "Stats Panel not available yet",
    
    -- Tooltip Enhancer
    ["--- DreamHouse Info ---"] = "--- DreamHouse Info ---",
    ["Placement"] = "Placement",
    ["Indoor"] = "Indoor",
    ["Outdoor"] = "Outdoor",
    ["Size"] = "Size",
    ["Size_Tiny"] = "Tiny",
    ["Size_Small"] = "Small",
    ["Size_Medium"] = "Medium",
    ["Size_Large"] = "Large",
    ["Size_Huge"] = "Huge",
    ["Source"] = "Source",
    ["Category"] = "Category",
    ["Favorite"] = "Favorite",
    ["Type"] = "Type",
    ["Type_Decoration"] = "Decoration",
    ["Type_Room"] = "Room",
    ["--- Placed ---"] = "--- Placed ---",
    ["Locked"] = "Locked",
    ["Cannot be removed"] = "Cannot be removed",
    
    -- Preset Manager
    ["Preset Manager"] = "Preset Manager",
    ["Save new preset"] = "Save new preset:",
    ["Saved Presets"] = "Saved Presets:",
    ["Presets"] = "Presets",
    ["Delete preset X?"] = "Delete preset '%s'?",
    ["No items to save"] = "No items found to save!",
    ["Preset X saved"] = "Preset '%s' saved! (%d items)",
    ["No presets to export"] = "No presets to export",
    ["Import not implemented"] = "Import function not yet implemented",
    ["Preset load not implemented"] = "Preset loading not fully implemented (API dependent)",
    
    -- Quality Filter
    ["Rarity"] = "Rarity",
    ["Select All"] = "Select All",
    ["Select None"] = "Select None",
    
    -- Vendor Database
    ["Vendor Database"] = "Vendor Database",
    ["No vendor open"] = "No vendor open",
    ["Unknown Vendor"] = "Unknown Vendor",
    ["X new housing items from Y saved"] = "%d new housing items from %s saved!",
    ["X housing items already known"] = "%s: %d housing items already known",
    ["No housing items at this vendor"] = "No housing items at this vendor",
    ["TomTom Waypoint"] = "TomTom Waypoint",
    ["Waypoint for X set"] = "Waypoint for %s set!",
    ["Vendor: X in Y"] = "Vendor: %s in %s",
    ["No waypoint possible"] = "(No waypoint possible)",
    ["Statistics"] = "Statistics",
    ["Items"] = "Items",
    ["Vendors"] = "Vendors",
    ["Vendor database cleared"] = "Vendor database cleared!",
    ["VendorDB Commands"] = "Commands:",
    ["VendorDB not available"] = "Vendor database not available",
    
    -- Source on Map
    ["Show source on map"] = "Show source on map",
    ["No map position available"] = "No map position available",
    ["Item not in database"] = "This item is not in the database.",
    ["Visit vendor tip"] = "Tip: Visit the vendor that sells this item",
    ["Visit vendor tip2"] = "to automatically save its location!",
    ["No map position for item"] = "No map position could be found for this item.",
    ["Source cannot be shown on map"] = "The source cannot be shown on the map.",
    ["Source for X"] = "Source for %s",
    ["Visit vendor to save position"] = "(Visit the vendor to save the position!)",
    ["Content tracking not available"] = "Content tracking is not available.",
    ["X has no known source"] = "%s has no known source.",
    ["Visit vendors to collect items"] = "(Visit vendors to automatically collect items)",
    ["X is being tracked"] = "%s is being tracked. Look for the marker on the world map.",
    ["[DH] Mark as Favorite"] = "Mark as Favorite",
    ["[DH] Remove Favorite"] = "Remove Favorite",
    ["[DH] Add to Hotbar"] = "Add to Hotbar",
    ["[DH] Remove from Hotbar"] = "Remove from Hotbar",
    ["[DH] Show source on map"] = "Show source on map",
    
    -- Debug Console
    ["Debug"] = "Debug",
    ["Entries"] = "Entries",
    ["Output X entries to chat"] = "Output all %d entries to chat",
    ["Ctrl+A = All, Ctrl+C = Copy"] = "Ctrl+A = All, Ctrl+C = Copy",
    ["Log cleared"] = "Log cleared",
    ["DreamHouse Debug Log"] = "DreamHouse Debug Log",
    ["End (X entries)"] = "End (%d entries)",
    ["Debug Log Export"] = "Debug Log Export - Ctrl+A, Ctrl+C to copy",
    ["Exported"] = "Exported",
    ["Console initialized"] = "Console initialized (Ctrl+A, Ctrl+C to copy)",
    ["-> Chat"] = "-> Chat",
    
    -- Core / Slash Commands
    ["Commands"] = "Commands:",
    ["/dh debug"] = "/dh debug - Toggle debug console",
    ["/dh export"] = "/dh export - Debug log export popup",
    ["/dh stats"] = "/dh stats - Show statistics",
    ["/dh favorites"] = "/dh favorites - Show favorites",
    ["/dh hotbar"] = "/dh hotbar - Toggle hotbar",
    ["/dh vendordb"] = "/dh vendordb - Vendor database commands",
    ["/dh reset"] = "/dh reset - Reset settings",
    ["/dh test"] = "/dh test - Write test message to log",
    ["Reset all settings?"] = "Reset all DreamHouse settings?",
    ["Settings reset"] = "Settings reset!",
    ["Unknown command"] = "Unknown command. Use /dh help",
    ["X test messages written"] = "%d test messages written to log!",
    
    -- Editor Modes
    ["Mode_None"] = "None",
    ["Mode_BasicDecor"] = "Basic Decor",
    ["Mode_ExpertDecor"] = "Expert Decor",
    ["Mode_Layout"] = "Layout",
    ["Mode_Customize"] = "Customize",
    ["Mode_Cleanup"] = "Cleanup",
    ["Mode_ExteriorCustomization"] = "Exterior",
    
    -- Collections Tab
    ["Collections"] = "Collections",
    ["Collection"] = "Collection",
    ["Collections Tab"] = "Collections",
    ["Back to list"] = "Back to list",
    ["No items in collection"] = "No items in collection",
    ["[DH] Add to Collection"] = "Add to Collection",
    ["Create new collection"] = "Create new collection",
    ["Remove from collection"] = "Remove from collection",
    ["Confirm"] = "Confirm",
    ["Change icon"] = "Change icon",
    ["Rename collection"] = "Rename collection",
    ["Rename"] = "Rename",
    ["Enter new name"] = "Enter new name:",
    ["Collection Hotbar Mode"] = "Collection Hotbar Mode",
    ["Active"] = "Active",
    ["Click to activate"] = "Click to activate",
    ["Click to deactivate"] = "Click to deactivate",
    ["Ctrl+Scroll to cycle collections"] = "Ctrl+Scroll to cycle collections",
    ["Set as active collection"] = "Set as active collection",
    ["Remove active status"] = "Remove active status",
    ["No collections available"] = "No collections available!",
    ["Collections not implemented"] = "Collections will be available in a future update.",
    ["Collection Sets"] = "Collection Sets",
    ["Seasonal Items"] = "Seasonal Items",
    ["Limited Items"] = "Limited Items",
    ["Complete Sets"] = "Complete Sets",
    ["Incomplete Sets"] = "Incomplete Sets",
    ["Create new collection"] = "Create new collection",
    ["Click to create your first collection"] = "Click to create your first collection",
    ["No collections yet"] = "No collections yet",
    ["Create a collection to organize your decor"] = "Create a collection to organize your decor",
    ["Enter collection name"] = "Enter collection name:",
    ["Create"] = "Create",
    ["Delete collection X?"] = "Delete collection '%s'?",
    ["Select icon"] = "Select Icon",
    ["More icons"] = "More icons...",
    ["Search atlas"] = "Search atlas...",
    ["CHM active - disable first"] = "Please disable the CHM first",
    ["CHM active"] = "CHM active",
    ["Search collections"] = "Search collections...",
    ["Search items"] = "Search items...",
    ["No search results"] = "No results",
    
    -- 3D Preview
    ["3D Preview"] = "3D Preview",
    ["Click to show 3D model"] = "Click to show 3D model",
    
    -- Hotbar Slot Selection
    ["Select Slot"] = "Select Slot",
    ["Slot"] = "Slot",
    ["Empty"] = "Empty",
}

-- ============================================
-- SET ACTIVE LOCALE
-- ============================================

-- Default to German
local activeLocale = deDE

-- Switch to English if client is English
if locale == "enUS" or locale == "enGB" then
    activeLocale = enUS
end

-- Metatable for easy access with fallback
setmetatable(L, {
    __index = function(t, key)
        local value = activeLocale[key]
        if value then
            return value
        end
        -- Fallback to German if not found
        value = deDE[key]
        if value then
            return value
        end
        -- Return key if nothing found
        return key
    end,
    __newindex = function(t, key, value)
        rawset(activeLocale, key, value)
    end,
})

-- Helper function for formatted strings
function DreamHouse.L.Format(key, ...)
    local str = L[key]
    if select("#", ...) > 0 then
        return string.format(str, ...)
    end
    return str
end

-- Get current locale
function DreamHouse.L.GetLocale()
    return locale
end

-- Check if using English
function DreamHouse.L.IsEnglish()
    return locale == "enUS" or locale == "enGB"
end

