Return to Solutions Overview <-

Get a full region name based on the country code you specify - TypeScript & Webflow

With this beautiful snippet, you can easily retrieve a full region name based on the country code you specify (you can even specify the translated language; default is the language of the country code you enter). The language selected is TypeScript. You can find a ready-to-use template at https://github.com/BarthMedia/TypeSpaces-for-Webflow/

(Still under development as of March 15th 2023)

With this beautiful snippet, you can easily retrieve a full region name based on the country code you specify (you can even specify the translated language; default is the language of the country code you enter). The language selected is TypeScript. You can find a ready-to-use template -> here <-.

// Get translated region name
export function getTranslatedRegionName(
  countryCode: string,
  language: boolean | string = false
) {
  // Define
  const regionNames = new Intl.DisplayNames(
    [
      language !== false
        ? language.toString().toLowerCase()
        : countryCode.toLowerCase(),
    ],
    {
      type: 'region',
    }
  );

  // Return
  return regionNames.of(countryCode.toUpperCase());
}

FAQs

You still have an open question about BMG.studio and how we operate. Chances are good that you will find what you are looking for here:

Why does this FAQ exist?

Well. As of Wednesday, March 15th 2023, I think this component looks really cool.

Can I clone this FAQ component?

Yes. Yes you can. You can do so -> here <-

Still have questions?

It's okay to reach out. Use either email or our calendar tool