0

I know this is a little stupid that I am asking for a .dll or a namespace which contains Localization while others are asking how to do the localization.

But I have spent half an hour on seeking the reference file or namespace and have got no luck.

I tried to find System.Globalization or similar references in VS 2012 and have found nothing.

Here is the question which I followed to do my coding asp.net mvc multilanguage urls/routing

I am following the code written by Feras Kayyali

private  string  GetCurrentCulture()
     {
         string lang;

         // set the culture from the route data (url)

         if (RouteData.Values["lang"] != null &&
            !string.IsNullOrWhiteSpace(RouteData.Values["lang"].ToString()))
         {
             lang = RouteData.Values["lang"].ToString();
             if (Localization.Locales.TryGetValue(lang, out lang))
             {
                 return lang;
             }
         }

As you can see in the code, he used the Localization.Locales class which I cannot find from anywhere.

Please help.

Thank you !

Community
  • 1
  • 1
Franva
  • 6,565
  • 23
  • 79
  • 144

1 Answers1

0

I'm pretty sure that is custom code and not part of .NET. I think Locales is a dictionary/lookup to help map a two letter ISO language name to a Windows culture name. Take a look at the constructor for CultureInfo and the Windows National Languages Support reference for culture names.

Co7e
  • 1,008
  • 10
  • 17
  • thanks you Steve. I'll just leave it here for a few more days to see if there are anybody who can give a hand. cheers – Franva Jan 29 '14 at 00:58