code: function findFallbackLocale(locale) {
    const locales = getAvailableLocales();
  
    for (let i = locale.length - 1; i > 1; i -= 1) {
      const key = locale.substring(0, i);
  
      if (locales.includes(key)) {
        return key;
      }
    }
  
    return null;
  }
docs: Find a fallback locale