How do I create a site for a UK client?

Hi team,

I’m building a site for a UK-based client and all their content is stored in en_GB profiles. Could you help me understand the steps needed to create an experience for them, and ensure we are using the right locale?

Thanks,
Amani

Hi Amani,

The default language and country in Answers is en_US and US respectively but this can easily be changed.

Backend Search Configuration

For the search configuration you will need to update supportedLocales and countryRestrictions.

  • supportedLocales - This is an array of locales that are supported. If you just want it to support en_GB then set this value to [en_GB]
  • countryRestriction - This is an array of countries that is used to restrict location search and improve the accuracy of location search. If the client just has clients in the GB this should be set to GB.
  • boundingBox - (optional) Just like in the US, this should be set up to improve location accuracy if the locations in the account are located in a small geographical area.

Putting this together the config could look like this:

{
    supportedLocales: ["en_GB"],
    countryRestriction: ["GB"]
}

Frontend Configuration

Navigate to global_config.json and update the following: “locale”: “en_GB”.

Thanks!

Hi @Lisa_Lundegard and @afarooque,

Have the instructions changed at all for UK clients? I’m working on UK client Childbase Partnership (Yext - Sign In) and I am unable to get the preview to return any results when I set the “locale” in global_config.json to “en_GB” and the “supportedLocales” in the search config to “en_GB.”

However, if I set the “locale” in global_config.json to “en” and leave “supportedLocales” blank, the preview works and returns the expected results.

Any ideas here on what I’m doing wrong? Thank you!

Hi Jessie,

It looks like your account has regular English profiles, so you shouldn’t need to do anything different to get results to return! This guidance is only for profiles stored as English (United Kingdom) - en_GB.

Thanks!!

  1. When I uploaded to KG, I set the Country/Region to GB. How did my profile get set to US English? (Just so I know for next time)

  2. To clarify, I can keep the locale as “en” but I should still make countryRestriction “GB” right?

Hey Jessie -

For the questions around locales, I’d recommend this post - Impact of Different Languages/Locales - #2 by Liz_Frailey. It has a lot of context about the language profiles & their impact! In short, the locale will be set by a different field (‘locale’) rather than the Country/Region.

And yes, if all profiles are the same in the account, you can keep them as “en”, but adding GB to the countryRestrictions allows that country to be searchable on Answers maps.

With the latest Theme update the referenced changes to the Frontend Configuration now occur in the locale.config.json file.

Updating to the below values will work moving forward:

  "default": "en_gb",
  "localeConfig": {
    "en_gb": {