Copied to clipboard

Flag this post as spam?

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


  • Akeem 43 posts 198 karma points
    Apr 11, 2016 @ 20:34
    Akeem
    0

    Retrieve DictionaryItem

    Hi ,

    Please how can i retrieve the Dictionary Value of an item in French when an still on the English site . i have used this but its not working irrespective of the int value i pass into Value .

     public static string GetDictionaryItemByCulture(string key, CultureInfo culture)
        {
            Language byCultureCode = new Language(culture.Name);
            string nameing = new Dictionary.DictionaryItem(key).Value(1);
            return nameing;
        }
    

    my Dictionary looks like this .. enter image description here

    And i need to get the french Value when am on English Site. Can anyone help me out .

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Apr 11, 2016 @ 21:24
    Alex Skrypnyk
    0

    Hi Akeem,

    You need to set current culture to French before getting value from Dictionary.

    System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
    

    Cheers

  • Akeem 43 posts 198 karma points
    Apr 14, 2016 @ 14:21
    Akeem
    0

    Thank you alex .

  • 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