i18n_cache_exists()
The i18n_cache_exists()
function is used to check if the specified cache is already created in the GM-I18n system.
This function can only be used after the i18n_create()
function is called.
Syntax
Usage
i18n_cache_exists(cache_id, [i18n]);
Parameters
Name | Type | Default | Description |
---|---|---|---|
cache_id | Integer | The cache ID to check. You can get it from i18n_get_cache_id() function. | |
i18n | Boolean | I18n | false | The I18n struct reference, or leave it empty to use the global i18n struct. |
Returns
Boolean
Examples
Create Event
// assume the system is initialized on global variable
// get the cache ID from "hello" key, from "en" locale
var cache_id = i18n_get_cache_id("hello", , "en");
// check if the cache is already created in the system
var is_cache_exists = i18n_cache_exists(cache_id);
The message caching isn't available for HTML5 export. So, this function will always return
false
in HTML5.Table of Contents