Locale_config.json Not in Code Editor

Hi Team,

I was looking into getting started on setting up Multi-Language Answers for a client, but when I went to the Code Editor, the locale_config.json file didn’t seem to be there. Is there an explanation for why this might be/how I might fix this?

image

Best,
Jon

No problem, this just means that your repo pre-dates this. Here’s what you should do:

  1. Add a new file in the config directory and name it locale_config.json

  2. Navigate to the local_config.json file in the theme (themes/answers-hitchhiker-theme/locale_config.json) and copy the contents. It should look something like this:

     {
      "default": "en",
      "localeConfig": {
        "en": {
          // "fallback": [""], // allows you to specify locale fallbacks for this locale
          // "translationFile": "<filepath>.po", // the filepath for the translation file
          // "urlOverride": "", // provide an override for the url path for this locale if you want it to be 
    different than specified in the urlFormat object
          "experienceKey": "<REPLACE ME>" //  the unique key of your search configuration for this locale
        }
      },
      "urlFormat": {
        "baseLocale": "{locale}/{pageName}.{pageExt}",
        "default": "{pageName}.{pageExt}"
      }
    }
    
  3. Fill in the experienceKey in the locale_config.json file

  4. Remove the experienceKey and locale from the global_config.json file

Hope that helps! Let us know if you have an other questions.

Hi Liz,

I’m not seeing that file in the theme, so I just copied what you provided above. I imagine that should work just as well. Thanks!

Best,
Jon

What version of the theme are you on? You’ll need to make sure you’re on theme version 1.16 or higher to build multi-language experiences!

It says I’m on version 1.10.1, how can I upgrade to 1.16?