LUA identify Language

  • #1, by AndresThursday, 04. June, 05:24 6 months ago
    Hi!

    I hope you´re doing great!

    I´m creating a second language for my game (Spanish/English)

    Is there a way to identify which language is selected in Lua Scripting?

    I want something like this: 

    If Language = Spanish then
    blah
    Else
    Blah
    End If

    Thanks!
    Andrés

    Newbie

    24 Posts


  • #2, by afrlmeThursday, 04. June, 13:35 6 months ago
    Yeah.

    local lang = game.StandardLanguage

    if lang == Languages["English"] then
    -- do something
    elseif lang == Languages["Spanish"] then
    -- do something else
    elseif...
    -- do something else
    else
    -- do something else
    end
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11

    Imperator

    6862 Posts

  • #3, by AndresMonday, 08. June, 05:10 6 months ago
    Thanks! grin

    Newbie

    24 Posts

Write post