Programmatically interact with Locadapt using the window.locadapt
object
window.locadapt
object that allows developers to programmatically interact with the translation functionality. This API reference outlines the main methods and properties available for advanced usage and integration.
updateContent()
mutationObserver
picks up on added nodes, but not text updates by default as for most scenarios this leads to excessive translation requests).
figureOutLanguage()
setupCanonicalAndAlternateLinks()
toggleSelector()
selectLanguage(code: string, nativeName: string)
currentTranslateToLanguage
localStorageData
localStorage
of your site by our plugin.
applyTranslations(translations: Map<string, { originalText: string; translatedText: string; }>)
collectTranslatableContent()
sendTranslationRequest(items: TranslationItem[])
window.locadapt
object or contact us for detailed information on these advanced methods.