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 6150 posts 24110 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 .

Please Sign in or register to post replies

Write your reply to:

Draft