Localization External Functions

From HEWIKI
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 +
[[category:Localization]]
 
{{tocright}}  
 
{{tocright}}  
  

Latest revision as of 21:35, 7 November 2012

Contents

Overview

There are two categories of HeroEngine Localization system external functions:

  1. DEV-mode external functions, which support the creation of localized string databases while a game is under development, and
  2. RT-mode external functions, which support the use of localized string databases when a game is being played (i.e., at the game's "runtime").


Keys

Localization callback external functions identify files and string tables by their keys. Both DEV-mode and RT-mode configuration files are identified by a special reserved key with the value 1.


DEV-Mode Localization

DEV-Mode External Functions

// Causes the development localization system to be initialized, the node specified is the controlling node for the localization system
//   and by default will be the $LOCALIZATION system node.
//
// callback_node: a GOM node upon which various system event methods are called
//
// returns FALSE, if the localization subsystem has already been started up, or is otherwise disabled or unusable
// returns TRUE, after the localization system has been started up
//
// causes SCRIPT ERROR if the callback_node is NONE
external function Loc_Startup( callback_node as NodeRef ) as Boolean
 
 
// Causes all dirty (or all) configuration, universe and development tables to be saved to the respository
//   causes callback events:
//     Loc_OnAPICallFailed( ... )
//     Loc_SingleFileCallback(...)
//     Loc_MultiFileCallback(...) 
external function Loc_SaveAllAsync( force_non_dirty_write as Boolean ) as Boolean 
// force_non_dirty_write: when TRUE, causes all files to be saved.  when FALSE, causes only files with changes to be saved.
//
// returns FALSE, never.
// returns TRUE, when saving has begun.
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Creates a new, empty configuration using the specified details.
//   causes callback events:
//     LOC_OnAPICallFailed(  ) failure conditions: a configuration is already loaded, a configuration is in the process of loading, invalid name, 
//                                                        invalid filename, invalid runtime filename
external function Loc_ConfigurationCreate( name as String, filename as String, runtime_filename as String ) as Boolean
// filename: the filename where this configuration will be saved to and loaded from in the repository
// runtime_filename: the filename where the runtime configuration data will be saved to in the repository
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
// Causes a configuration to be loaded from the repository
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: a configuration is already loaded, a configuration is in the process of loading, invalid filename, 
//                                                    missing file in repository, invalid or inconsistent data in specified file
//     Loc_SingleFileCallback(...)
external function Loc_ConfigurationLoadAsync( file_name as String ) as Boolean  
// file_name: the filename where this configuration will be loaded from and later saved to the repository
//
// returns TRUE, upon the start of the loading process
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
// Causes the currently loaded configuration to be unloaded from memory
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, the configuration has not yet completed loading,
//                                                    unsaved data exists in the configuration (any universe or string table)
external function Loc_ConfigurationUnload() as Boolean
// returns TRUE, upon the completion of the unloading process
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Causes a configuration to be unloaded from memory without checking for dirtiness
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration in memory, configuration has not yet completed loading
external function Loc_ConfigurationPurgeWithoutSaving() as Boolean
// returns TRUE, upon the completion of the purging process
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
// Causes a configuration and all of its universes, tables & string tables to be saved to the repository
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration in memory, configuration has not yet completed loading, error occurs while writing to repository
//     Loc_SingleFileCallback(...)
//     Loc_MultiFileCallback(...) 
external function Loc_ConfigurationSaveAsync() as Boolean  
// returns TRUE, upon the initiation of the saving process
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Changes the name of the configuration
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, invalid name specified
external function Loc_ConfigurationNameSet( new_name as String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
// Changes the filename of the configuration
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, invalid failename specified
external function Loc_ConfigurationFilenameSet( new_filename as String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Changes the runtime filename of the configuration
//   causes callback events:
//    LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, invalid failename specified
external function Loc_ConfigurationRuntimeFilenameSet( new_runtime_filename as String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Retrieves the current meta-data settings
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded
external function Loc_ConfigurationMetaGet( meta_key_value_map_out references LookupList indexed by String of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Establishes the current meta-data settings, replacing any former settings
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, any key or value string does not meet constraints
external function Loc_ConfigurationMetaSet( meta_key_value_map as LookupList indexed by String of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Retrieves the current development parameter settings
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded
external function Loc_ConfigurationDevParameterGet( parms_value_map_out references LookupList indexed by String of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Establishes the current development parameter settings, replacing any former settings
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, any key or value string does not meet constraints
external function Loc_ConfigurationDevParameterSet( parms_value_map as LookupList indexed by String of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Retrieves the current runtime parameter settings
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded
external function Loc_ConfigurationRTParameterGet( parms_value_map_out references LookupList indexed by String of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Establishes the current runtime parameter settings, replacing any former settings
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, any key or value string does not meet constraints
external function Loc_ConfigurationRTParameterSet( parms_value_map as LookupList indexed by String of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Adds a locale to the list of supported locales for this configuration
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, locale does not meet constraints, locale is already in the list
external function Loc_ConfigurationLocaleAdd( locale_to_add as String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Removes a locale from the list of supported locales for this configuration
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, locale does not meet constraints, locale is not in the list,  locale is in use on any loaded universe
external function Loc_ConfigurationLocaleRemove( locale_to_remove as String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Returns the list of supported locales for this configuration
//   causes callback events:
//     LOC_OnAPICallFailed( ... )  failure conditions: no configuration is in memory, configuration not yet loaded
external function Loc_ConfigurationLocaleList( locales_out references List of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Returns the list of universes and their general characteristics for this configuration
// causes callback events:
//   LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded
external function Loc_ConfigurationUniverseList( universe_count_out references Integer, universe_keys_out references List of ID, universe_names_out references List of String, universe_range_lows_out references List of Integer, universe_range_highs_out references List of Integer, universe_filenames_out references List of String, universe_runtime_filenames_out references List of String ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Returns the description for this configuration.  The use of LOC_ConfigurationUniverseList and LOC_ConfigurationLocaleList
//   is used to return the detail information about Universes and Locales
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded
external function Loc_ConfigurationDescribe( name_out references String, filename_out references String, runtime_filename_out references String, universe_count_out references Integer, locale_count_out references Integer ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Creates a universe using the specified parameters
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, specified range is invalid, specified range overlaps another range in use, any constraing is violated
external function Loc_ConfigurationUniverseCreate ( name as String, filename as String, runtime_filename as String, range_low as Integer, range_high as Integer, universe_key_out references ID ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Removes a universe from the configuration
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, specified universe does not exist, specified universe is not loaded, specified universe is currently loading
external function Loc_ConfigurationUniverseRemove ( universe_key as ID ) as Boolean
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
// Begins loading the specified universe
//   causes callback events:
//     LOC_OnAPICallFailed( ... ) failure conditions: no configuration is in memory, configuration not yet loaded, specified universe does not exist, specified universe is not loaded, specified universe is currently loading,  
//                                                    repository file is not available, the repository file is malformed, the repository file is inconsistent with the universe's declaration in the configuration
//     Loc_SingleFileCallback(...)
external function Loc_UniverseLoadAsync( universe_key as ID ) as Boolean
// returns TRUE, upon beginning the loading process
// returns FALSE, if an error occurs
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
external function Loc_UniverseUnload( universe_key as ID ) as Boolean
// : causes the specified universe to be unloaded from memory
//
// returns TRUE, upon the completion of the unloading process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => unsaved data exists in the universe, any table, or any string table
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
 
external function Loc_UniversePurgeWithoutSaving( universe_key as ID ) as Boolean
// : causes a universe to be unloaded from memory without checking for dirtiness
//
// returns TRUE, upon the completion of the purging process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
external function Loc_UniverseSaveAsync( universe_key as ID ) as Boolean  
// : causes the specified universe to be saved from memory to disk
//
// returns TRUE, upon beginning the saving process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the repository file can not be saved
//     Loc_SingleFileCallback(...)
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseNameSet( universe_key as ID, new_name as String ) as Boolean
// : sets the name of the specified universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseFilenameSet( universe_key as ID, new_filename as String ) as Boolean
// : sets (changes) the filename of the specified universe's saved file
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseRuntimeFilenameSet( universe_key as ID, new_runtime_filename as String ) as Boolean
// : sets (changes) the runtime filename of the specified universe's saved file
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
// TODO:  this may fold into universe describe
external function Loc_UniverseRangeGet( universe_key as ID, range_low references Integer, range_high references Integer ) as Boolean
// : gets the range of the specified universe string numbers
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully 
 
external function Loc_UniverseRangeSet( universe_key as ID, new_range_low as Integer, new_range_high as Integer ) as Boolean
// : sets (changes) the range of the specified universe string numbers
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the new range is invalid
//     => the new range overlaps any existing range
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseMetaGet( universe_key as ID, meta_key_value_map_out references LookupList indexed by String of String ) as Boolean
// : retrieves the current meta-data settings
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseMetaSet( universe_key as ID, meta_key_value_map as LookupList indexed by String of String ) as Boolean
// : establishes the current meta-data settings, replacing any former settings
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseLocaleAdd( universe_key as ID, locale as String ) as Boolean
// : adds a locale to the list of supported locales for this universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the locale does not meet constraints
//     => the locale is already in the list
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseLocaleRemove( universe_key as ID, locale as String ) as Boolean
// : removes a locale from the list of supported locales for this universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the locale does not meet constraints
//     => the locale not in the list
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseLocaleList( universe_key as ID, locales_out references List of String ) as Boolean
// : returns the list of supported locales for this universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseBaseLocaleSet( universe_key as ID, new_base_locale as String ) as Boolean
// : sets the base locale for this universe.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the locale does not meet constraints
//     => the locale is not in the list of supported locales
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseTableList( universe_key as ID, table_count_out references Integer, table_keys_out references List of ID, table_names_out references List of String, table_range_lows_out references List of Integer, table_range_highs_out references List of Integer, table_filenames_out references List of String ) as Boolean
// : retrieves the declarations of all of the string tables defined in the specified universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseRuntimeTableList( universe_key as ID, runtime_table_count_out references Integer, runtime_table_keys_out references List of ID, runtime_table_names_out references List of String, runtime_table_range_lows_out references List of Integer, runtime_table_range_highs_out references List of Integer ) as Boolean
// : retrieves the declarations of all of the runtime string tables defined in the specified universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseRuntimeTableFilesList( universe_key as ID, runtime_table_key as ID, locale_to_rt_filename_map as LookupList indexed by String of String) as Boolean
// : retrieves the locale-to-filename map from the specified runtime string table defined in the specified universe
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
 
external function Loc_UniverseDescribe( universe_key as ID, name_out references String, filename_out references String, runtime_filename_out references String, range_low references Integer, range_high references Integer, base_locale_out references String, locale_count_out references Integer, table_count_out references Integer, runtime_table_count_out references Integer ) as Boolean
// : returns the description for this universe.  The use of LOC_UniverseTableList, Loc_UniverseRuntimeTableList,
//   and LOC_UniverseLocaleList is used to return the detail information about tables and locales.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseTableCreate( universe_key as ID, name as String, filename as String, range_low as Integer, range_high as Integer, table_key_out references ID) as Boolean
// : Creates the new table in the specified universe.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the requested range is outside the bounds of the universe's range
//     => the requested range overlaps an existing table's range
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseTableRemove( universe_key as ID, table_key as ID ) as Boolean
// : removes a table from the universe.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the specified table is loaded
//     => the specified table is loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseRuntimeTableCreate( universe_key as ID, runtime_name as String, runtime_filename_for_base_locale as String, runtime_range_low as Integer, runtime_range_high as Integer, runtime_table_key_out references ID ) as Boolean
// : Creates the new runtime table in the specified universe.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//     => the requested range is outside the bounds of the universe's range
//     => the requested range overlaps an existing runtime table's range
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_UniverseRuntimeTableRemove( universe_key as ID, runtime_table_key as ID ) as Boolean
// : removes a runtime table from the universe.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe is not loaded
//     => the specified universe has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_RuntimeTableNameSet( runtime_table_key as ID, new_name as String ) as Boolean
// : sets the name of the specified runtime table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_RuntimeTableRangeSet( runtime_table_key as ID, new_range_low as Integer, new_range_high as Integer ) as Boolean
// : sets (changes) the range of the specified runtime table's string numbers
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified runtime table does not exist
//     => the new range is invalid
//     => the requested range is outside the bounds of the universe's range
//     => the requested range overlaps an existing runtime table's range
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_RuntimeTableFilenameForLocaleSet( runtime_table_key as ID, locale as String, new_filename as String ) as Boolean
// : sets the filename of the specified locale's runtime table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the locale is not in the list of supported locales for the development table
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_RuntimeTableDescribe( runtime_table_key as ID, name references String, locales_filename_map_out references LookupList indexed by String of String, range_low_out as Integer, range_high_out as Integer ) as Boolean
// : retrieves the definition of the specified runtime table.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified runtime table does not exist
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableLoadAsync( table_key as ID ) as Boolean  
// : begins loading the specified table.
//
// returns TRUE, upon beginning the loading process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist.
//     => the table has not yet completed loading.
//     => the repository file is not available
//     => the repository file is malformed
//     => the repository file is inconsistent with the table's declaration in the universe
//   Loc_SingleFileCallback(...)
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableUnload( table_key as ID ) as Boolean
// : causes the specified table to be unloaded from memory
//
// returns TRUE, upon the completion of the unloading process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => unsaved data exists in the table 
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TablePurgeWithoutSaving( table_key as ID ) as Boolean
// : causes a table to be unloaded from memory without checking for dirtiness
//
// returns TRUE, upon the completion of the purging process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableSaveAsync( table_key as ID ) as Boolean  
// : causes the specified table to be saved from memory to disk
//
// returns TRUE, upon beginning the saving process
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => the repository file can not be saved
//   Loc_SingleFileCallback(...)
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableNameSet( table_key as ID, new_name as String ) as Boolean
// : sets the name of the specified table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableFilenameSet( table_key as ID, new_filename as String ) as Boolean
// : sets the filename of the specified table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableRangeSet( table_key as ID, new_range_low as Integer, new_range_high as Integer ) as Boolean
// : sets (changes) the range of the specified table's string numbers
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => the new range is invalid
//     => the new range overlaps any existing range
//     => the new range would cause removal of already defined strings from the table
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableMetaGet( table_key as ID, meta_key_value_map_out references LookupList indexed by String of String ) as Boolean
// : retrieves the current meta-data settings
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableMetaSet( table_key as ID, meta_key_value_map as LookupList indexed by String of String ) as Boolean
// : establishes the current meta-data settings, replacing any former settings
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableLocaleAdd( table_key as ID, locale_to_add as String ) as Boolean
// : adds a locale to the list of locales for this table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => the locale does not meet constraints
//     => the locale is already in the list
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableLocaleRemove( table_key as ID, locale_to_remove as String ) as Boolean
// : removes a locale from the list of locales for this table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//     => the locale does not meet constraints
//     => the locale not in the list
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableLocaleList( table_key as ID, locales_out references List of String ) as Boolean
// : returns the list of locales for this table
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableDescribe( table_key as ID, name_out references String, filename_out references String, range_low_out references Integer, range_high_out references Integer ) as Boolean
// : retrieves the definition of the specified table.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_TableStringList( table_key as ID, strings_out references List of Integer ) as Boolean
// : retrieves the list of string numbers present in the specified table.
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified table does not exist
//     => the specified table is not loaded
//     => the specified table has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
// Retrieves the lowest unassigned localized string id within a table
external function Loc_TableGetLowestUnusedLocalizedStringID( table_key as ID, lowest_available_localized_string_id references Integer ) as Boolean
// returns TRUE, if it succeeded
// returns FALSE, if all localized string ids within a table's range are in use
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
 
// Determine if a specified localization string id is in use within a table
external function Loc_TableIsLocalizedStringIDInUse( table_key as ID, localized_string_id as Integer ) as Boolean
// returns TRUE, if localized string id is in use within the specified table
// returns FALSE, if id is not in use
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
// causes SCRIPT ERRORS if localized_string_id is out of range for the specified table
 
external function Loc_StringCreate( string_num as Integer ) as Boolean
// : creates the specified string number.
//   Its initial value for context is a zero-length strings, and no locale translations exist.
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number already exists
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_StringRemove( string_num as Integer ) as Boolean
// : removes the specified string number.
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number does not exist
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_StringGet( string_num as Integer, context_out references String, locale_value_map_out references LookupList indexed by String of String ) as Boolean
// : retrieves the context and locale/translated values map for the specified string number
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number does not exist
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
external function Loc_StringContextGet( string_num as Integer, context references String ) as Boolean
// : retrieves the context for the specified string number
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number does not exist
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_StringContextSet( string_num as Integer, new_context as String ) as Boolean
// : sets (changes) the specified string number's context value.
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number does not exist
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
external function Loc_StringValueForLocaleGet( string_num as Integer, locale as String, value_out references String ) as Boolean
// : retrieves the requested locale's translated value for the specified string number
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number does not exist
//     => the locale is not in the supported list of locales for the configuration
//     => the locale is not in the supported list of locales for the universe
//     => the locale does not meet constraints
//     => the specified translation does not exist
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_StringValueForLocaleSet( string_num as Integer, locale as String, new_value as String ) as Boolean
// : sets (changes) the requested locale's translated value for the specified string number
// 
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified string is not mapped into any loaded universe
//     => the specified string is not mapped into any loaded table
//     => the specified string is not mapped into any runtime table
//     => the specified string number does not exist
//     => the locale is not in the supported list of locales for the configuration
//     => the locale is not in the supported list of locales for the universe
//     => the locale does not meet constraints
//     => the specified translation does not exist
//     => any constraint is violated
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_FindStringIDs ( pcre_regular_expression as String, range_low as Integer, range_high as Integer, id_list_operation as String, string_ids references List of Integer ) as Boolean
// : Searches currently-loaded strings within the user-specified range for matches to the user-specified regular expression. 
//   Matches are added or removed from the user-specified string ID list in accordance with the user-specified string ID list operation.
//
//   pcre_regular_expression is a Perl regular expression.
//
//   range (range_low, range_high) restricts the attempts to match to string_ids in the specified range (inclusive).  Range 0 0 causes the engine to search all
//       strings currently in memory.  If a range is specified and intersection (id_list_operation) is specified, it only checks the ids passed in the
//       string_ids list that are within the specified range it does not check the entire range.
//
//   id_list_operation tells the engine how to handle the string_ids list.  It must be the following values:
//       replace - list is cleared out prior to the addition of matching string_ids
//       union - list contains the union of the string_ids passed in and string_ids matching new expression
//       intersection - list contains the intersection of string_ids (e.g. only those string_ids passed in that also match the new expression)
//       empty string "" - same as replace
//
//
// returns TRUE, upon success (finding no matches for a particular expression is still considered to be successfully completed if no errors occurred)
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => specified string ids are not in memory (if intersection is specified)
//     => the configuration has not yet completed loading
//     => no tables are loaded to search
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully or if invalid id_list_operation specified
//
 
external function Loc_StringFindByNumber ( string_number as Integer, universe_key_out references ID, table_key_out references ID, runtime_table_key_out references ID ) as Boolean
// : retrieves the known universe / table / runtime table positions of the requested string number
//   returns values of '0' (NONE) if unknown
//
// returns TRUE, upon success
// returns FALSE, if an error occurs
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_GenerateRuntimeConfigurationAsync() as Boolean  
// : saves to the repository the runtime configuration file
//
// returns FALSE, if an error occurs
// returns TRUE, after the generation has begun
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => an error occurs writing to the repository
//   Loc_SingleFileCallback(...)
//     => when generation and writing has succeeded
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
 
external function Loc_GenerateRuntimeUniverseAsync( universe_key as ID ) as Boolean  
// : saves to the repository the runtime universe file
//
// returns FALSE, if an error occurs
// returns TRUE, after the generation has begun
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified universe does not exist
//     => an error occurs writing to the repository
//   Loc_SingleFileCallback(...)
//     => when generation and writing has succeeded
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//
 
external function Loc_GenerateRuntimeTableAsync( runtime_table_key as ID ) as Boolean
// : saves to the repository the specified runtime string table file for all locales
//
// returns FALSE, if an error occurs
// returns TRUE, after the generation has begun
//
// causes callback events:
//   LOC_OnAPICallFailed( ... )
//     => no configuration is in memory
//     => the configuration has not yet completed loading
//     => the specified runtime table does not exist
//     => any needed development string table is not loaded, or has not finished loading
//     => any needed development string table has not finished loading
//     => an error occurs writing to the repository
//   Loc_SingleFileCallback(...)
//   Loc_MultiFileCallback(...)
//     => when generation and writing has succeeded
//
// causes SCRIPT ERROR if LOC_Startup has not been called successfully
//

DEV-Mode Callbacks

The Loc_OnAPICallFailed callback is called in response to synchronous errors or warnings.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox