Skip to content

Commit

Permalink
get active lang
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed Jun 15, 2024
1 parent 7102759 commit 06d3a89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { isBrowser, getWeployOptions, setWeployOptions, setWeployActiveLang, setIsTranslationInitialized, getIsTranslationInitialized, shouldTranslateInlineText } = require('./utils/configs.js');
const { isBrowser, getWeployOptions, setWeployOptions, setWeployActiveLang, setIsTranslationInitialized, getIsTranslationInitialized, shouldTranslateInlineText, getWeployActiveLang } = require('./utils/configs.js');
const checkIfTranslatable = require('./utils/translation/checkIfTranslatable.js');
const allWeployLanguagesList = require('./utils/languages/allWeployLanguagesList.js');
const { fetchLanguageList } = require('./utils/languages/fetchLanguageList.js');
Expand Down Expand Up @@ -675,7 +675,7 @@ function modifyHtmlStrings(rootElement, language, apiKey, shouldOptimizeSEO) {
}

async function startTranslationCycle(node, apiKey, delay, shouldOptimizeSEO = false) {
const lang = await getLanguageFromLocalStorage();
const lang = getWeployActiveLang() || await getLanguageFromLocalStorage();

return new Promise(async (resolve) => {
if (!delay) {
Expand Down

0 comments on commit 06d3a89

Please sign in to comment.