Localized ASP.NET Files

I have a web page with a link, and the link should match the PDF file of this language. I am wondering where should I put these PDF files. If I put them in App_LocalResources, I can’t provide a link to / App _LocalResources / TOS_en-US.pdf, can I?

+3
source share
3 answers

PDF does not have to be in the App_LocalResources folder. This folder is for RESX files only.

PDF files may be sent elsewhere in your application. For example, a great place to put in the ~ / PDF folder. Then your links should be dynamically generated (similar to what Greg showed):

string cultureSpecificFileName = String.Format("TOS_{0}.pdf", CultureInfo.CurrentCulture.Name);

, :

  • , PDF . - , , PDF .
  • . TOS_en-US.pdf. 2- ISO, CurrentCulture.TwoLetterISOLanguageName, TOS_en.pdf.
+1

- (.. "TOS_ {0}.pdf" ), :

string cultureSpecificFileName = string.Format("TOS_{0}.pdf", CultureInfo.CurrentCulture);
0

PDF ? , .

0

Source: https://habr.com/ru/post/1726935/


All Articles