locked
Some simple localization questions RRS feed

  • Question

  • User1533001300 posted

    There has recently been a requirement to localize the Web Applications so that we can have languaged websites, eg English, French, German etc. The system has around 250 aspx pages and about 100 ascx controls.


    I have a few general questions

    • Am I better having 400+ Resource files (one for each page/control)  or am I better having 1 large one for the whole application
    • If I have one large file does that cause problems when rendering the pages
    • Is there a trade off when localizating (does it use alot of memory / cpu on the server etc)
    • What are the recommended naming conventions - Ive looked <filename>_<Control>_<property> or namespaces
    Friday, July 24, 2009 10:34 AM

Answers

  • User845932231 posted

    1. Divide common resources into logical units and put in App_Globalresources folder. Use them commonly for all the pages. For example create a resx file Messages.resx for all the error and success messages you show in different pages. Create another global resource file for all UI elements such as Save, Print, Reset buttons, menus etc. (By common message what i mean is a resource that can come in more than one page.)

    Now for individual files create Local resources (so for 400 pages, 400 seperate local resources files)and put the resources in that. Whenever you see some text is repeating in another page also, try moving it to global resources.

    2. As far as I know the length of the file is not an issue. But if its tooooo huge, managing it will be a bigh issue.

    3. No, we havent faced any performnace probs using resource files. It will definitely use more memory than showing text directly from page, but that can be ignorable.

    4. For all the Local resource files the name shld be same as the aspx file name..its mandatory.. For global resources you can give what ever name you want.. We usually give file names that can reflect the content of the file.. like Messages.resx, UI.resx etc

    http://wiki.asp.net/page.aspx/55/internationalization/



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 24, 2009 11:59 AM