Copied to clipboard

Flag this post as spam?

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


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 10, 2011 @ 10:30
    Jan Skovgaard
    0

    Using danish characters æ,ø and å in urls

    Hi guys

    I'm currently working on a project where we are converting a site from Dynamicweb to Umbraco. On the site that is live now they have some pages with danish characters in the urls. like this...www.domain.com/plæneklipper.aspx (that's a lawnmover for those curious about the meaning of the word ;-)).

    I'm wondering if it's just a matter of outcommenting these three element in the umbracoSettings.config file

          <char org="æ">ae</char>
          <char org="ø">oe</char>
          <char org="å">aa</char>

    Or is there something I should be ware of and use some urlRewriting insted perhaps?

    Looking forward to receive some input.

    Cheers
    /Jan

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 10, 2011 @ 10:39
    Douglas Robar
    1

    If you remove the <char org="......> from umbracoSettings.config then pages with those characters in the nodename will NOT be changed for ascii urls. If you want a global setting that's the place to do it.

    If you want to keep the global character changes but override it on a few pages for backward compatibility with the old site's urls then you want to add a docType property with an alias of 'umbracoUrlName' and on those specific pages type the url you really want (with the danish characters). That will force the page's url no matter what umbraco might have otherwise created for it.

    cheers,
    doug.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 14, 2011 @ 10:13
    Jan Skovgaard
    0

    Hi Doug

    Did not have time to look further into this before to day.

    It turns out that if you use æ,ø or å in the umbracoUrlName it's being converted into ae,oe and aa just like it's been setup in the umbracoSettings.config...

    So now I'm a bit confused on how to deal with this. I forgot to mention that it's an 4.0.2.1 that the current project is based on - Don't know if there are any bugs with the above in this version?

    Cheers

    /Jan

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 14, 2011 @ 11:14
    Douglas Robar
    1

    Hi, Jan - 

    Oooh, you know, I can believe that. It makes sense that such settings would be applied even to the umbracoUrlName. I've never tried that particular combintation. Seems there would need to be a setting that lets you have a "raw" url name of precisely the characters you type. 

    Thus, there are two options as I see it.

    1. Disable all the relevant entries in the umbracoSettings.config file. Though the original specification for urls required ascii characters that is no longer the case and all browsers support full unicode urls. The down-side is that I would have no idea how to type a æ character, for instance. On the other hand, if I spoke Danish I would and so no problem. And besides, I would rarely type it anyway - that's what point-n-click navigation is for (or google) so that I never type anything except the main domain url.

    2. Find/create a utility that would allow 'raw' url names. This might already exist in uComponents (they keep adding things so quickly I can't keep up!). Or grab the code from the umbraco source for umbracoUrlName and make your own that bypasses the umbracoSettings entries.

    Sorry to have lead you down an unhelpful path in the first place. Do let us know what you decide to do.

    cheers,
    doug.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 14, 2011 @ 14:14
    Jan Skovgaard
    0

    Hi Doug

    I guess it makes perfect sense that it's working this way. Really should have thought about it myself the other day too :-)

    I am working on option 1 at the time of this writing. Just need to republish the site, which takes some time because I work locally and the DB server is setup far away from here. But then I have some time to reply in here, right? :-)

    The reason I have chosen option 1 is that it's a danish shop that is very unlikely to be visited by other people than danes, but of course there could be some issues if they need to visit the shop while they're traveling and for some reason only have access to a local machine with a local keyboard. But it's a very thought up scenario even though it could happen.

    Option 2 would probably be the best and most bulletproof option but in this case option 1 is sufficient and does not harm the project and as far as I can see the one that's most fast to implement. But you're right the uComponents guys are working incrdibly fast...it's tough to keep up and remember what is possible to do with the stuff in this amazing package :-)

    Thanks for your help and pointer Doug, they're highly appreciated.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft