@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.
Files changed (2) hide show
  1. package/lib/localize.js +3 -2
  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
- if (oslo.collection) {
242
- languageId = supportedLocalesDetails.find(l => l.code === osloLang || l.pack === osloLang)?.id;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/intl",
3
- "version": "3.40.0",
3
+ "version": "3.40.1",
4
4
  "description": "Internationalization APIs for number, date, time and file size formatting and parsing in D2L Brightspace.",
5
5
  "main": "lib/number.js",
6
6
  "type": "module",