Translate item given its path.
path
Translation item path.
You can use the static method Globalize.translate()
, which uses the default
locale.
Globalize.locale( "pt_BR" );
Globalize.translate( "greetings/bye" );
// ➡ "Tchau"
You can use the instance method .translate()
, which uses the instance locale.
var ptBr = new Globalize( "pt-BR" );
ptBr.translate( "greetings/bye" );
// ➡ "Tchau"