Multilingual / Mehrsprachig

  • Is there a way to detect the local language to write multilingual scripts?


    Gibt es eine Möglichkeit die lokale Sprache zu erkennen, um mehrsprachige Skripte zu schreiben?

  • Since there's already a way to load properties, I believe only a simple option to detect the player language should be fine.


    Code
    translations = {};
    translations["en"] = getProperty("locales/en.properties");
    translations["de"] = getProperty("locales/de.properties");
    translations["fr"] = getProperty("locales/fr.properties");
    ...
    function t(player, msg)
    return (translations[player.getLocale()] or translations["en"] or {})[msg] or msg;
    end

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!