Copied to clipboard

Flag this post as spam?

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


  • dominik 711 posts 733 karma points
    Feb 10, 2012 @ 14:04
    dominik
    0

    set language manually

    Hello,

    I am using the following line to redirect to a specific site:

     Response.Redirect(umbraco.library.NiceUrl(Convert.ToInt32(Node.GetCurrent().GetPropertyValueRecursive("intLinkMyDashboard"))));

    This works fine

    This link intLinkMyDashboard exists also for some other languages.

    Now i want to redirect to the link of a specific language.

    I tried to set the cultureInfo before redirecting but it does not work.

    Any Ideas?

    Thanks

  • Rodion Novoselov 694 posts 859 karma points
    Feb 10, 2012 @ 14:58
    Rodion Novoselov
    0

    Hi. If you have a multilingual site separated to language sections by "manage hostnames" then you can turn the "useDomainPrefixes" option to "true" in the ~/config/umbracoSettings.config file. This will force "NiceUrl" to prepend a generated URL with a proper domain part.

  • dominik 711 posts 733 karma points
    Feb 10, 2012 @ 16:37
    dominik
    0

    hi rodion. if i do so how can I set in my example URL that i want to use a specific prefix

    thanks

  • Rodion Novoselov 694 posts 859 karma points
    Feb 12, 2012 @ 12:22
    Rodion Novoselov
    0

    Hi. Actually you don't have to do anything. You just pass the ID of the document to the NiceUrl method as usual and the returned URL will be prefixed with a proper hostname (provided that you've set useDomainPrefixes to true in the configuration file).

  • dominik 711 posts 733 karma points
    Feb 13, 2012 @ 09:14
    dominik
    0

    HI Rodion,

    I dont want to parse an ID.

    I just want to use my intLinkMyDashboard paramter which is set for each language (language tree in content section).

    Now I want to redirect to this link in a specific language (for example de)

    Response.Redirect(umbraco.library.NiceUrl(Convert.ToInt32(Node.GetCurrent().GetPropertyValueRecursive("intLinkMyDashboard"),"de")));

    as an example.

    Thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies