@brightspace-ui/intl 3.40.0 → 3.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/localize.js +3 -2
- package/package.json +1 -1
package/lib/localize.js
CHANGED
|
@@ -238,8 +238,9 @@ export const getLocalizeClass = (superclass = class {}) => class LocalizeClass e
|
|
|
238
238
|
if (osloCollection) {
|
|
239
239
|
const oslo = this.documentLocaleSettings.oslo;
|
|
240
240
|
let languageId = 0;
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
const doc = document.documentElement;
|
|
242
|
+
if (doc.hasAttribute('data-custom-lang') && oslo.collection) {
|
|
243
|
+
languageId = Number(doc.dataset.languageId) || supportedLocalesDetails.find(l => l.code === osloLang || l.pack === osloLang)?.id;
|
|
243
244
|
if (languageId) {
|
|
244
245
|
const batch = oslo.batch && new URL(oslo.batch, self.origin);
|
|
245
246
|
if (batch && languageId !== batch.searchParams.get('languageId')) {
|
package/package.json
CHANGED