{"version":3,"file":"toIntlLanguage.mjs","names":[],"sources":["../src/toIntlLanguage.ts"],"sourcesContent":["/**\n * Copyright (c) 2026-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * Converts a language code to a format suitable for Intl APIs.\n * Chromium and Safari only supports \"nb\" and \"no\". Supplying \"nn\" when in Chrome falls back to \"en\".\n * As such, we have to live with bokmål here.\n */\nexport const toIntlLanguage = (lang: string): string => {\n  if (lang === \"nb\" || lang === \"nn\") {\n    return \"no\";\n  }\n  return lang;\n};\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAa,kBAAkB,SAAyB;AACtD,KAAI,SAAS,QAAQ,SAAS,KAC5B,QAAO;AAET,QAAO"}