Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use various culture specific resource files on ASP.NET

Tags:

c#

asp.net

I have a website which currently uses EN-US and I also have resource file for french. what code should I need to write to make the application use the french version of the resource file.

The site is a commerce server and share point site that uses .NET

Any code examples would be great.

like image 218
kalls Avatar asked Aug 31 '25 17:08

kalls


1 Answers

You have a couple of options. Option one is at the application level. You could do this in the system.web section of the web.config:

<globalization culture="fr-FR" uiCulture="fr-FR" />

Another option is on the page:

<%@Page Culture="fr-FR" Language="C#" %>

or by thread:

Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

See http://support.microsoft.com/kb/306162 for more info.

like image 89
Mike Avatar answered Sep 02 '25 06:09

Mike