Copied to clipboard

Flag this post as spam?

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


  • Fengelz 106 posts 221 karma points
    Apr 07, 2010 @ 10:53
    Fengelz
    0

    Getting the current language

    Hi.

    I'm currently trying to retreive a dictionary item inside a ashx handler. And I cant quite figure out how to get the current language that the user is viewing the form in.

    I was hoping to do something like this:

    var respons = new umbraco.cms.businesslogic.Dictionary.DictionaryItem("ContactAlert");
    var lang = umbraco.cms.businesslogic.language.Language.GetByCultureCode(System.Globalization.CultureInfo.CurrentUICulture.Name);
    context.Response.Write(respons.Value(lang.id));

    Is it even possible since there is no page information in the handler? Do I have to send the language code along to the handler?

     

    Best regards Sune Fengel

Please Sign in or register to post replies

Write your reply to:

Draft