using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace BansheeEngine
{
/** @addtogroup Localization
* @{
*/
///
/// Manages string tables used for localizing text. Allows you to add and remove different tables and change the active
/// language.
///
public partial class StringTables : ScriptObject
{
private StringTables(bool __dummy0) { }
protected StringTables() { }
/// Determines the currently active language. Any newly created strings will use this value.
public static Language ActiveLanguage
{
get { return Internal_getActiveLanguage(); }
set { Internal_setActiveLanguage(value); }
}
/// Returns the string table with the specified id. If the table doesn't exist new one is created.
/// Identifier of the string table.
/// String table with the specified identifier.
public static StringTable GetTable(uint id)
{
return Internal_getTable(id);
}
/// Removes the string table with the specified id.
/// Identifier of the string table.
public static void RemoveTable(uint id)
{
Internal_removeTable(id);
}
/// Registers a new string table or replaces an old one at the specified id.
/// Identifier of the string table.
/// New string table to assign to the specified identifier.
public static void SetTable(uint id, StringTable table)
{
Internal_setTable(id, table);
}
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_setActiveLanguage(Language language);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Language Internal_getActiveLanguage();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern StringTable Internal_getTable(uint id);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_removeTable(uint id);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_setTable(uint id, StringTable table);
}
/** @} */
}