0

I am new to Sitecore and working on a Sitecore 10.1 JSS project. For the Spanish(es) version of the page When I add an internal link in XM, it resolves the link as an English one and doesn't append es in the URL. Although not sure if this is expected behavior but can anyone let me know how can we resolve the internal links to the correct URLs having es appended in the URL.

2 Answers 2

2

You can change this behavior by updating the "languageEmbedding" setting in the LinkManager configuration (asNeeded, always, never):

<sitecore>
    <linkManager>
        <providers>
            <add name="sitecore">
                <patch:attribute name="languageEmbedding" value="always" />
            </add>
        </providers>
    </linkManager>
</sitecore>

But keep in mind that even if the language is not being embedded in the URL doesn't mean Sitecore won't resolve it in the proper (context) language.

3

I faced a similar issue with Sitecore 10.3 initial version & Sitecore Headless Rendering module 21.0.0. Sitecore layout service internal link doesn't append language code.

I tried to add the above patch from @Miguel , also added it to the site definition of my JSS site. Nothing helps.

Finally, the Sitecore support team responded as a product bug, they have an internal reference number 580748.

This issue is fixed in Sitecore Headless Rendering module 21.0.1.

1
  • since we've also have an issue with this bug - please be sure in solution you use dlls from the module itself - the latest nuget package doesnt have 21.0.1 fix ;(
    – Leonid
    Oct 17, 2023 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.