globalization

Subfolders in App_GlobalResources (ASP.NET)

Is it possible to put resource files (.resx) within subfolders inside App_GlobalResources? For example: /App_GlobalResources/someresources/myfile.resx /App_GlobalResources/someresources/myfile.fr-fr.resx /App_GlobalResources/othereresources/otherfile.resx /App_GlobalResources/othereresources/otherfile.fr-fr.resx Or,...

NetworkService permission (multi-language)

So, I'm doing a setup project, all written in VB.NET, and I need to give to the NetworkService account, permission on a certain folder. The following code works perfect (Windows 7 - en-US): Dim dInfo As New DirectoryInfo("C:\FolderOrFileToGivePermission") Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl() dSecurity.AddAccess...

How to convert Date format

Hi All, I have "Friday, April 02, 2010" as date now I want to display "04/02/2010" if browser language is selected english and "02.04.2010" if browser language is selected as German. All I want, is to display the date as per the browser format. Any Idea how this can be done? ...

Setting thread culture to default

In silverlight application I have MyTexts.resx (for english) and MyTexts.ja-JP.resx (for japanese) resource files. Before loading a page I can set current culture to japanese as following: Thread.CurrentThread.CurrentCulture = new CultureInfo("ja-JP"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja-JP"); But sometimes I n...

how to convert string to double with proper cultureinfo

Hi All, I have two nvarchar fields in database to store the DataType and DefaultValue, I have a DataType Double and value as 65.89875 in english format. Now I want the user to see the value as per the selected browser language format (65.89875 in English should be displayed as 65,89875 in german). Now if the user edits from german for...

VS 2008 does not understand .resource files

I'm trying to add globalization support to my C# application. According to MSDN, there should be one embedded resource file for neutral culture and satellite DLLs with resource files for other cultures. I've created 2 satellite DLLs without any problems and got my app to automatically load right one using ResourceManager. But I can't em...

VB.NET/C# Globalization: Prevent creation of culture-specific satellite assemblies (resources)

Hello, is there a possibility to prevent the creation of all the folders with the resources.dll files and just embed every globalization culture right into the compiled exe file? ...

HowTo: obtain culture dateTime format

?string.Format(CultureInfo.GetCultureInfo("en-US"), "{0:d}", now) "4/12/2010" ?string.Format(CultureInfo.GetCultureInfo("fr-FR"), "{0:d}", now) "12/04/2010" I want to write a method: string GetDateFormat(culture) ?GetDateFormat(CultureInfo.GetCultureInfo("en-US")) "M/d/yyyy" ?GetDateFormat(CultureInfo.GetCultureInfo("fr-FR")) "dd/MM...

Tips on refactoring existing .net applications to support localization?

We're going global. I've been tasked with refactoring our existing products to support localization. Last week I shunned using resource files (.resx) in favor of a home-baked database look-up method. After hitting a serious snag with that, I'm back to the microsoft way of using resx. All the documentation I've seen so far details how...

SharePoint 2007 Force Culture and UI Culture

i'm developing a sharepoint portal, and i want to force a portal culture to 'pt-PT', i already installed the moss and wss language packs and i changed the web.config too with the following statment: but if i set the browser language to other language the controls change their culture (this only occurs in portal frontoffice, in backoffic...

C++ Win32 API equivalent of CultureInfo.TwoLetterISOLanguageName

The .NET framework makes it easy to get information about various locales; the Win32 C++ APIs are a bit harder to figure out. Is there an equivalent function in Win32 to get the two-letter ISO language name given an integer locale ID? In C# I'd do: System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(1034); strin...

Read values from resx files?

How to read strings from the MyResource.resx file from c#. I am not calling this from the asp.net page, rather i am calling from my bussiness logic. Assembly assembly = this.GetType().Assembly; ResourceManager resourceManager = new ResourceManager("MessagesResource", assembly); resourceManager.GetString("SCHEME_UNQ"); he...

Difference between Convert.ToString Method and Object.ToString() with regard to Globalization

Is there any difference between Convert.ToString Method and Object.ToString() in C#.net other than how these handle null value. There could be some difference between the two in Globalization Perspective. ...

Is is possible to programmatically change the resourceProviderFactoryType?

I have a custom implementation of IResourceProvider and ResourceProviderFactory. Now the default way of making sure ASP.NET uses these custom types is to use the web.config and specify the factory like so: <globalization resourceProviderFactoryType="Product.Globalization.TranslationResourceProviderFactory" /> This works perfectly, exc...

Can you filter the allowable CultureInfo types for a ASP.NET website?

I could definitely accomplish what I want with a custom handler, but I was hoping it would be possible to adjust the web.config to define allowable cultures. Basically, I have a website that has resource files for a number of languages. I would like to deploy the same website to different domains with different configurations specifying ...

How can I support localization in windows mobile 6.5?

I have a simple C# app that needs to support several languages. What is the best way to do this in windows mobile 6.5? Also, how can I test the different languages? Anyone have an example? ...

Modify values on-the-fly during SqlAdapter.Fill( )

What would the proper way be to modify values on the fly as they are loaded into a DataTable by SqlAdapter.Fill()? I have globalized my application's log messages. An integer indicating the event type and serialized data relevant to the event is stored in the database as show below. When I display the logged events through a DataGridVie...

OracleGlobalization.SetThreadInfo() ORA-12705 Error

Hi guys! I'm stuck in a problem, i cannot workaround! I have a Oracle client 11, with registry key set to AMERICAN_AMERICA.WE8ISO8859P1. I cannot edit this key, but my application must get data from Oracle in Italian culture format. So I want to edit culture info form my application only. I'm trying to using OracleGlobalization class in ...

How can I determine if a string is a Hebrew or Gregorian date?

Hi, I have a string value that contains or a Hebrew date, or a Gregorian date. How can I determine if it's Gregorian or Hebrew in C#? ...

Unicode string turns garbage at serverside.

I have a situation. I have a label in ASP.NET 2.0(C#). The label should display a dutch language text that is "Sähköpostiosoite", I tried setting the Label.Text both from markup and code-behind but what I see in the browser response is "Sähköpostiosoite". Originally assigned string "Sähköpostiosoite" get replaced with "Sähköpostios...