CopyManager
Alias for the function signature of callbacks. Easier on the eyes than (() => void)[] :)
Constructors
new CopyManager()
new CopyManager(
app
):CopyManager
Creates a manager to hold all copy data.
Parameters
• app: Application
<any
>
Returns
Default
Source
Properties
onCopyChanged
onCopyChanged:
Signal
<(languageId
) =>void
> =Signals.onLanguageChanged
Source
EN_CA
static
readonly
EN_CA:string
='en_ca'
Id for English Canada. This is the default.
Source
Accessors
currentLanguage
get
currentLanguage():string
A getter for the current set language.
Returns
string
The current set language id.
Source
Methods
changeLanguage()
changeLanguage(
pNewLanguage
):void
Updates the current language and calls all registered callbacks.
Parameters
• pNewLanguage: string
The new language id.
Returns
void
Source
getCopy()
getCopy(
pID
):string
Gets a line of copy.
Parameters
• pID: string
The id of the copy.
Returns
string
The found copy, or an error string.
Source
setData()
setData(
pData
,pLanguage
?):void
Sets the data object and, optionally, the language of the CopyManager. This should be a JSON object.
Parameters
• pData: any
The JSON data object.
• pLanguage?: string
The language code to use.
Returns
void