Javascript functions
All functions you can call in your Javascript code
Weglot.translate(payload, callback)
Weglot.translate(
{
'words':[ { "t":1,"w": "Red" } ],
'languageTo':'fr'
}
, function(data) { console.log(data) }
);Weglot.getCurrentLang(): String
Weglot.getLanguageName(code): String
Weglot.getBestAvailableLanguage(): String
Weglot.search(term, callback): Boolean
Weglot.switchTo(code): void
Weglot.on(eventName, callback)
languageChanged (only JS integration)
initialized
switchersReady
Weglot.off(eventName, callback): Boolean
Weglot.initialize(options): void
Last updated