Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Frank Laumann 1 post 71 karma points
    Oct 03, 2017 @ 13:49
    Frank Laumann

    Culture dependent UrlReplacing


    I'm working on a multi domain website, where easch domain is a different language, and I have used UrlRplacing for special characters from the language of the first domain. Now when I have to add UrlReplacing for the next doamin (with another language than the first doamin) I found that the same same character might need to be replaced differently depending on the language of the domain.

    Therefore my question is: Is it possible to make UrlReplacings depending on the culture the domains have ?

    Thanks in advance for any efforts :-)

  • John 1 post 71 karma points
    Apr 12, 2018 @ 10:12

    I am having the same issue, where the French version should replace 'Ü' with 'U', but the German version should replace 'Ü' with 'Ue'.

    The only way that I could see of doing this was to edit the Umbraco.Core logic in \Umbraco.Core\Strings\DefaultShortStringHelper.cs.

    My idea was to change the urlReplacing xml from

        <char org="Ü">Ue</char>

    With something along these lines

        <culture code="de-de">
            <char org="Ü">Ue</char>
        <culture code="fr-fr">
            <char org="Ü">U</char>

    NOTE: This only works on the umbraco instance that I am working on as the url begins with the culture of the page e.g. and so the solution about would be able to use the replaceMany function that is currently used to check if the url passed in contains the corresponding culture code.

  • Sebastiaan Janssen 4959 posts 14913 karma points MVP admin hq
    Apr 12, 2018 @ 10:16
    Sebastiaan Janssen

    Please please please please do not start running custom builds of Umbraco, it is not necessary and never advisable as you will never be able to upgrade and take advantage of security fixes, performance increases and new features.

    Make sure to look into IContentFinders for example -

  • Sjors Pals 617 posts 270 karma points
    Apr 12, 2018 @ 12:07
    Sjors Pals

    You might consider to do this on IIS level with url rewriting, not ideal but at least you don't have to fix it in Umbraco.

Please Sign in or register to post replies

Write your reply to: