We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9059f89 commit 90f22cdCopy full SHA for 90f22cd
docs/website/js/translations.js
@@ -276,7 +276,12 @@ const translations = {
276
}
277
};
278
279
-// Load translations into i18n
280
-if (typeof i18n !== 'undefined') {
281
- i18n.loadTranslations(translations);
282
-}
+// Load translations into i18n (wait for it to be available)
+(function loadTranslationsIntoI18n() {
+ if (typeof window.i18n !== 'undefined' && window.i18n.loadTranslations) {
+ window.i18n.loadTranslations(translations);
283
+ } else {
284
+ // Retry after a short delay if i18n isn't ready yet
285
+ setTimeout(loadTranslationsIntoI18n, 10);
286
+ }
287
+})();
0 commit comments