new LangTools(langDB)
- Description:
Language Tools class
- Source:
Parameters:
Name | Type | Description |
---|---|---|
langDB |
Object | The language database |
Methods
compareWithDB(langPairs) → {Object}
- Description:
Compare language pairs with the language database
- Source:
Parameters:
Name | Type | Description |
---|---|---|
langPairs |
Object | The language pairs to compare |
Returns:
The result of the comparison
- Type
- Object
generateLangPairs(langPairs) → {Object}
- Description:
Generate language pairs
- Source:
Parameters:
Name | Type | Description |
---|---|---|
langPairs |
Object | The language pairs to generate |
Returns:
The result of the generation
- Type
- Object
getFullName(langObj) → {string}
- Description:
Get the full name of the language
- Source:
Parameters:
Name | Type | Description |
---|---|---|
langObj |
Object | The language object |
Returns:
The full name of the language
- Type
- string
getLanguage(code) → {Object}
- Description:
Get language by code
- Source:
Parameters:
Name | Type | Description |
---|---|---|
code |
string | The language code |
Returns:
The language object
- Type
- Object
getLanguageList(blacklist) → {Object}
- Description:
Get a list of languages, excluding those in the blacklist
- Source:
Parameters:
Name | Type | Description |
---|---|---|
blacklist |
Array | The list of language codes to exclude |
Returns:
The list of languages
- Type
- Object
isCJK(langCode) → {boolean}
- Description:
Check if a language is CJK (Chinese, Japanese, Korean)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
langCode |
string | The language code |
Returns:
True if the language is CJK, false otherwise
- Type
- boolean
lookupAlias(langObj) → {Object}
- Description:
Lookup alias in the language database
- Source:
Parameters:
Name | Type | Description |
---|---|---|
langObj |
Object | The language object |
Returns:
The language object
- Type
- Object
lookupDB(key, name) → {Object}
- Description:
Lookup in the language database by key or name
- Source:
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key to lookup |
name |
string | The name to lookup |
Returns:
The language object
- Type
- Object