Multi-Language Experiences Module 2 Module Assessment (2)

Hi there,

I am working on step 14

but /es gives me 404 error - screenshot
maybe I did not do step 9 correctly??
but I dont see option of ‘Rebuild’ - screenshot

Kindly help how I can fix this!
Kotoko

Hi Kotoko,

Apologies for the delay in getting back to you (looks like you had an initial post here). Unfortunately your challenge account may have expired (they expire after 5 days) as I don’t see any code changes in your account. If you redo the challenge I’m happy to take a look and help with any issues.

For step 9, “Rebuild” is in the “View” dropdown.

Hi There,

Thanks for the reply!
I managed to re-build but still getting 404 error for testing /en domain…


As for Step 11,

Update the locale_config.json file to include the Spanish language. This is always the most important first step. You want to add an object for “es” and fill out the experienceKey to match the experienceKey you added in Step 2.

Did I do it correctly?

Is this why /en preview does not work?
Let me know what I am missing …

Kotoko

Hi Kotoko,

It looks like you haven’t redone the challenge yet after the account expired - I don’t see changes in the account for step 6 onwards - remember to save the search config and commit changes in the frontend!

For step 11, you’ll need to keep the object for "en" in the localConfig object when you add the es object. It will look something like this:

{
    "default": "en",
    "localeConfig": {
        "en": {
            "experienceKey": "brand_en" //  the unique key of your search configuration for this locale
        },
        "es": {
            // "fallback": [""], // allows you to specify locale fallbacks for this locale
            // "translationFile": "es.po", // the path, under the 'translations' directory, to the locale's .po file
            // "experienceKey": "answers-spanish" //  the unique key of your search configuration for this locale
        }
    },
    "urlFormat": {
        "baseLocale": "{language}/{pageName}.{pageExt}",
        "default": "{pageName}.{pageExt}"
    }
}

You can review this in the Multi-Language Frontend unit.

Hi Kristy,

I am unsure what I am missing but I am still getting 404 for /es URL.(Step 14)
Here is the video - https://www.screencast.com/t/MoenoVQD2x
Could you check and let me know how I should fic this?

Thank you,
Kotoko

Hi Kotoko! Could you please commit your code, both so you can save changes you made (your changes for steps 11-13 are not saved) and so it’s easier for us to see what you did and where the error is!

At step 14, did you hit “Update Preview”, wait for it to complete, and then do a hard refresh on the preview page before adding “/es” to the URL? Your code through step 13 looks right, so I think that might be the issue.