locked
Using Resource file in webpage in subdirectory RRS feed

  • Question

  • User-1297834874 posted

    Hi,

    I would like to create a bilingual web application and to do so I use Resources files.

    If my web page (lets say Default.aspx) is in the root folder I create resource files (Default.aspx.resx and Default.aspx.fr.resx in the App_LocalRessources folder) and everything works fine.

    But If i have a web page in a sub foider (lets say test.aspx inside a ~/Test folder), I can't just create resource files (test.aspx.resx and test.aspx.fr.resx in the App_LocalRessources folder). It don't work.

    Does anybody know how to make this works? Or any other way of creating bilingual web application will be appraciated.

     

    Thanks all.

    Wednesday, October 21, 2009 2:41 PM

Answers

  • User-1297834874 posted

    Hi,

    I've found the solution. Just add an App_LocalResources file in the subfolder.

    This means, if you have a file in ~/TestFolder/Test.aspx file

    You should also have ~/TestFolder/App_LocalResources/Test.aspx.resx, and Test.aspx.fr.resx in the same folder.

    Hope this will help someone.

    Regards

    ilearn

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 22, 2009 2:04 PM

All replies

  • User-1297834874 posted

    Any help??? 

    Thursday, October 22, 2009 11:38 AM
  • User-1297834874 posted

    Hi,

    I've found the solution. Just add an App_LocalResources file in the subfolder.

    This means, if you have a file in ~/TestFolder/Test.aspx file

    You should also have ~/TestFolder/App_LocalResources/Test.aspx.resx, and Test.aspx.fr.resx in the same folder.

    Hope this will help someone.

    Regards

    ilearn

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 22, 2009 2:04 PM
  • User-1397164318 posted

    Hi ilearn,

    great you already found the answer. Just one short additionall information: You might also create subdirectories within App_LocalResources, so you hat App_LocalResources/Test.aspx.resx, and App_LocalResources/fr/Test.aspx.fr.resx. This makes it (for me) easier to differ between the languages.

    Friday, October 30, 2009 9:08 PM
  • User798024243 posted

    Hi ileran, thanx, it was nice challenge and explanation, actually i used too much time, now I have to revise my app, at least, I have better app now, thanx again.

    Friday, October 5, 2012 1:55 PM