.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Why does localization with .resx need repeated keys? or does it really?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net


I have for quite some time localized a website with the resx files. But time after time, I keep wondering why I have to repeat the key/name for the label (or resource) that I make for the different languages. The name column in the resource files work as a primary key would in a database, but with resx files we need to write the 'primary key' again in all the files - with a good chance of errors. 

Can someone explain to me why this name/'primary key' of the resx files is not fixed for all resx files? There is such a big chance that in one resx file you make a typo in the name of the resource and then it does not work for that particular language - or that you even forget to put one of the labels into the language file.

Thanks for the input - and I am all ears if there is a better way to do it!


View Complete Post

More Related Resource Links

Localization .RESX files - How to work with translators


I understand I need to place all the translated strings in .RESX files. How do I work with translators??? I do not think they will be able to open RESX files? Please advise your existing method of working with them. They mostly know Word... :)


How to manually set which localization file (resx) to load up depending on user

Hi,I want to use localization as user base and not language base.  I would like to name my resx to default.aspx.ABC where ABC is the user's name.How do i manually specify which resx file the page should load up?  Thanks

Surrogate vs Natural Primary Keys - Data Modeling Mistake 2 of 10

In case you're new to the series I've compiled a list of ten data modeling mistakes that I see over and over that I'm tackling one by one. I'll be speaking about these topics at the upcoming IASA conference in October, so I'm hoping to generate some discussion to at least confirm I have well founded arguments.

The last post in this series Referential Integrity was probably less controversial than this one. After all, who can argue against enforcing referential integrity? But as obvious as surrogate keys may be to some, there is a good deal of diversity of opinion as evidenced by the fact that people continue to not use them.

SharePoint Localization Tips and Tricks

In this article, I'll round up the scattered pieces of information about localization in SharePoint, provide some tips and tricks and leave you with a working approach to localization. However, before we work on meeting the challenge, we should understand it.

Visual Studio Shortcut Keys

The following tables describe the shortcut keys in the Microsoft Dynamics AX Debugger.

Localization in ASP.NET 2.0

New Auto-Culture Handling in ASP.NET 2.0
ASP.NET 2.0 comes with a new auto-culture handling feature to make the task of localizing your application easier. Auto-culture handling can be enabled for each page by including the Culture="auto" and UICulture="auto" attributes in the Page directive of each page. Once enabled, the ASP.NET runtime will automatically map Accept-Language headers to CultureInfo objects and attach them to the current thread (unlike ASP.NET 1.x, where you need to do this manually). As a developer, you simply need to prepare the resources for the different cultures you want to support in your application. ASP.NET will then do the work of loading the appropriate resources for each culture as they are needed.

Implicit Localization
Let's use Visual Studio 2005 and create a new website project by going to File -> "New Web Site.." Name the project C:\Localization. For this application, I will use the Visual Basic 2005 language.

Search Engines and Multilanguage Websites - using .resx


I have a website (asp.net 3.5+c# +linq ) having thopition to change languages (2) by the user, Am using the search engine like in the example of:


this search will find any searched word in all the pages and return the link in the default language of the site, but problem for the second language , because by default the site language is English and the user have the option to change to other language.

and as I understood that the .resx files can not be searched like the aspx by the search engines.

I looked in many blogs and discussion boards for similar  case but unfortunately no clues on this issue .
The only same case posted :


and also I could not find any clue to move on, 

 Kindly requsted to guide me for the soultio

Thanks for your time and wish you all the best
your help is always appreciated


How to: MVC URL localization...


Hello all,

I have an MVC 2.0 application which currently has 3 different languages.(English, French, Spanish).
Although I've found many articles on how to localize an etnire MVC application I still haven't found an example on how to localize the URLs.

Assuming I have the following English URL:

When I switch in either French or Spanish, I'd like to have the following:
French: http://www.mywebsite.com/Produit
Spanish: http://www.mywebsite.com/Producto

How does one achieve such a task?
If anyone cares to show me a link or demo, that would be great!

Thanks in advance!

Localization not working in class library (composite control)



I have a class library called WEM.portal which used Resource files to localise text in my composite controls.

I store my resource files (eg MyResourceFile1.resx) in App_GlobalResources folder and then refer to them using

MyLabel1.text = My.Resources.MyResourceFile1.MyResourceKey1

This is all working ok until I create seperate files for each language such as MyResourceFile1.FR-fr.resx.

I have implemented this throughout my other web applications but the Class Library doesnt seem to want to work the same way

When I load the page it correctly showes the resourced keys which I have done through the web application BUT the resource keys in the composite controls does not seem to pick up the culture code.

Am I missing something stupid. Ive tried

  • changing the Build Action on the resource file to Content and Custom tool to GlobalResourceProxyGenerator
  • Creating a resourceManager but to no avail


Language Localization



I want to make my website into world's different  laguages.Im very new to it .

plz help

Setting default localization



I ever thought that I can set a default localization if the users one (which is set in the browser) isn't available.

I've implemented my localresource files for localization. The start.aspx.resx contains all texts and elements for German use and the start.aspx.en.resx for English users. When I switch the language in the browser settings from German to English everything works fine and the english text is displayed. But when I switch to an other language which is not German or English, it takes defaulty the german resource files.

I've set

UICulture="auto:en-US" Culture="auto:en-US"

as well, but it didn't assume the .en resource file automatically. (For example when I enter the website and switch the browser language to French or Italian it should take the english resource files.)

Thanks and regards,

Globalization and Localization


How to maintaine a web application in different languages.

For Examplel(English, Chinees,German...)

Need any Detailed Example.

Translating RESX files


So I took the Forums advice and made a separate RESX file for each ASPX page in my web app. Personally, I wanted to put all of my language strings into a single global RESX file, but instead I did it the 'right' way and made a separate one for each ASPX. So now Ive got about 100 different RESX files with 5 to 15 short strings of text each. Many of them are repeats. The question is, how can I export these 100 RESX files into one single spreadsheet that I can send off for translation to other languages? Whats the normal way to do that? I dont want to send the translating company 100 little files, I'd rather send just one big one. And I'd like to omit duplicate text strings (for example, "Cancel" appears in at least 50 of the RESX files - I dont want to pay for that word to be translated 50 times).


Basic Instincts: Resources and Localization in ASP.NET 2.0


In this installment of Advanced Basics Ted Pattison discusses the localization of Web sites in ASP.NET 2.0.

Ted Pattison

MSDN Magazine August 2006

Basic Instincts: Resources and Localization


There are two ways you can utilize resources such as strings, images, and text-based files from your Microsoft® . NET Framework-based application. You can embed them directly in the app or you can load them from an external file.

Ted Pattison

MSDN Magazine May 2006

The XML Files: XSLT Keys, Select vs. Match, Conflict Resolution, and More


This month Aaron Skonnard covers how keys work in XSLT, XSLT match and select attributes, SelectNodes order, finding