Errors
To help while developing, Two-Mi18n
throws errors when something is wrong.
They are all prefixed with the text [Two-Mi18n]
.
Validation of the translation object
.
Too help validating the translation object
, some errors are thrown in the constructor of TwoMi18n
.
The translations object is not defined.
This error is thrown when the translation object
is not defined.
The ‘default’ property is not defined.
This error is thrown when the default
property is not defined in the translation object
.
The default
property is required.
Example:
The default language “x” is not defined in the translations object.
This error is thrown when the default language is not defined in the translation object
.
No language specified
This error is thrown when no language is passed in parameter of the methods translate
or translateHTML
.