locked
multi language website in asp.net 4.0 RRS feed

  • Question

  • User-1891070552 posted

    Salam!

    I watn to develop a website i which there is 5 pages and i want to 5 pages in english and parsian language

    i have 2 resource file one for english and 2nd for parsian for my default.aspx page

    should i use these resource file for othar pages or i have create other 2 resource file for every page

    please if any one can help me with example

    Saturday, February 2, 2013 6:58 AM

Answers

  • User-1555788080 posted

    Hi,

    Same resource file can be used for multiple pages by placing them in App_GlobalResources. 

    Global resource file formats are:

    name.language.resx

    name.language-culture.resx


    Also make below note:

    Resource files under App_LocalResources are used for storing information that is not repeated accross pages, whereas App_GlobalResources is used for storing site-wide content or content that is duplicated on multiple pages.

    If we put all of our content only in global resource files then we will be overloading App_GlobalResources and it can grow in size and making it difficult to manage and update. For large application having lot of content in single resource file, there can be performance impact. 



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 2, 2013 8:54 AM

All replies

  • User1428336426 posted

    You have to create resource fille for each five pages.

    Saturday, February 2, 2013 7:10 AM
  • User-1891070552 posted

    so there is no solution in which i handl my requirment in 2 resource files

    Saturday, February 2, 2013 7:15 AM
  • User1428336426 posted

    As far as i knw you have to create individual resource file for eacgh page..

    Saturday, February 2, 2013 7:24 AM
  • User-1555788080 posted

    Hi,

    Same resource file can be used for multiple pages by placing them in App_GlobalResources. 

    Global resource file formats are:

    name.language.resx

    name.language-culture.resx


    Also make below note:

    Resource files under App_LocalResources are used for storing information that is not repeated accross pages, whereas App_GlobalResources is used for storing site-wide content or content that is duplicated on multiple pages.

    If we put all of our content only in global resource files then we will be overloading App_GlobalResources and it can grow in size and making it difficult to manage and update. For large application having lot of content in single resource file, there can be performance impact. 



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 2, 2013 8:54 AM
  • User614805505 posted

    Hi,

    so there is no solution in which i handl my requirment in 2 resource files

    Unless you code the translation feature by your own function, otherwise, you have to create the resource files for each page in order to use the localization features provided by ASP.NET.

    Saturday, February 2, 2013 9:14 AM