Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 493 Bytes

translate.md

File metadata and controls

27 lines (19 loc) · 493 Bytes

.translate( path )

Translate item given its path.

Parameters

path

Translation item path.

Example

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"