Browse Source

Fixed Lua set language function

master
Christopher 9 years ago
parent
commit
9be184b25e
  1. 2
      Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
  2. 6
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs

2
Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt vendored

@ -86,7 +86,7 @@ end
-- Set active language for string table
function M.setlanguage(languagecode)
M.luautils.activeLanguage = languagecode
M.luautils.ActiveLanguage = languagecode
end
-- Get a named string from the string table

6
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs vendored

@ -41,6 +41,12 @@ namespace Fungus
[Tooltip("The currently selected language in the string table. Affects variable substitution.")]
[SerializeField] protected string activeLanguage = "en";
/// <summary>
/// Gets or sets the active language.
/// </summary>
/// <value>The active language.</value>
public string ActiveLanguage { get { return activeLanguage; } set { activeLanguage = value; } }
/// <summary>
/// Lua script file which defines the global string table used for localisation.
/// </summary>

Loading…
Cancel
Save