globalization

How to support multiple languages in an ASP.NET web application?

I am working on a web forms application that needs to support multiple languages based on a user's preference. Here are some considerations to keep in mind about the needed solution: I want to avoid using resource files to store the different text translations because I'd like the ability to change them without having to recompile and ...

Changing CultureInfo of Main thread from worker thread

Is it possible to change CurrentUICulture of main thread when event is raised in worker thread? Code for ilustration: static void Main() { //do something Thread workerThread = new Thread(new ThreadStart(DoWork)); workerThread.Start(); //do something } void DoWork() { ConnectDatabase(); //do some work ChangeLangua...

Using a CSS File for site localization.

Hey guys, I'm creating a website with ASP.net MVC 2.0 which uses two different languages (English and Persian). what I want to is I need two have different layouts for these languages, English has a left to right and Persian has a right to left layout. What came to my mind was, if I could have two different css files like when you do i...

How to get correct timezone for client

Hi All, To get the correct timezone of the user I get the offset first using javascript:- var offset =new Date().getTimezoneOffset(); and then I apply assign the value to the server side variable. where I get the timezone using :- ReadOnlyCollection<TimeZoneInfo> timeZones = TimeZoneInfo.GetSystemTimeZones(); foreach (TimeZoneIn...

How to create a DateTime object not in the current culture

I'm really drawing a blank on this one. I've been working on globalization but the DateTime seems to always revert back to the CurrentThread's culture. I broke this down into smaller steps hoping to find my issue, but it's starting to drive me crazy. I've got a textbox with the date expressed as a string: // the CurrentThre...

Localization in asp.net mvc

Friends, I'm working in asp.net mvc 2.0 and I'm stuck at the stage where I want to translate the site content (menu items, labels etc.) into predefined languages selected from the drop-down list. I want it to perform through asynchronous request (if possible). I have no prior experience in implementing globalization/localization in eith...

WindowsForm switch between languages ?

Initially i tried to set: Thread.CurrentThread.CurrentUICulture = new CultureInfo("new selected language"); But from what i saw it doesnt change what was there already, only what comes after it. So i would need to refresh all the current text i had from the past language in use. i am looking for the best appoch to refresh my UI ...

Enterprise Library Validation Application Block and Internationalization

Scenario A .NET/WPF desktop application should be localized (or in MS terms globalized) to a different language than English. That is, the UI needs to be adopted completely (labels, icons, ...). Log file entries, audit trail entries, and other outputs of the application, however, should remain in English to allow the English-speaking ...

Xml Schemas and Date Times

I'm beginning a new project which involves heavy xml and schema use accross multiple platforms (windows, windows mobile, Iphone, Ipad, and more which are yet to be discovered!). This xml platform has to be able to exchange date times from all over the world as our product is currently being implemented in Australia as well as in Canada ...

Detect if any right-to-left language is installed

What is the easiest way to detect whether any right-to-left language is installed on the host Windows OS? (I need this in order to know if LTR marks will be displayed as squares, or work properly on the host OS) ...

Detect "Suplemental language support" on Windows XP

I need a way to programatically determine if this checkbox in control panel is checked (Windows XP): Screenshot: http://tinyurl.com/3357hhm The checkbox is in Control Panel - Regional settings - Language - Supplemental language support - and is called "Install files for complex script and right-to-left languages". It would be best to ...

How to use Global Resources in a Library

I use the Global Resources feature, not only to centralize all my output strings but to make it easy when using Localization (witch is almost 90% of the time). But I spread out my project into, not only the ASP.NET website, but with 2 Library projects as well. my question is: How can I use the ASP.NET Global Resource file in those ...

how asp.net mvc globalization work with my own ResourceProvider

i create a new class which inherite the IResourceProvider,and register it in web.config <globalization resourceProviderFactoryType="xx.xxx.xxxx" uiCulture="auto" enableClientBasedCulture="true"/> this new class just implement public GetObject(string resourceKey, CultureInfo culture) { .... } which will get globalization text fr...

Inconsistent codepage translation of input to C# ASPX web page IIS 10

We're having some unusual problems with input to an ASPX web page under IIS 10. Input parameter contains %A3 for the UK Pound Sign symbol. When the parameter string is accessed within the C# page source, the url un-encoding has been applied and we get a question mark instead. Believed that this was due to the default codepage being in...

Localizing the fields / attributes on the AccountModel for ASP.NET MVC

I want to localize / globalize the fields on my Login page. I am using ASP.NET MVC 3 Preview 1 with the razor view engine. Some background First of all, i've set my routing and added a localization attribute handler so that I can write http://mysite.com/{lang}/{controller}/{action}/{id}. Now this works all good. In my Viewsfolder I've ...

Globalization in ASP.Net MVC Controllers

I have a feeling this is something very obvious that I'm missing, but here goes. I'm trying to set up multiple languages in an ASP.Net MVC project (C#, MVC2, .Net4.0). However, I have some cases where I want to have phrases translated within the Controller (error/success messages, mostly). However, it seems every method I try is eithe...

How do i convert a floating point string to an int in c#

I have a string: string test = "19,95"; and I wan't to convert it to an int. I use: int num = Convert.Int32(test); However it throws an FormatException. And tells me that the string is not a proper string for conversion. My guess is that it has to do with the decimal seperator. How do i work around this? ...

.Net - CultureInfo: How to get country name

I used the code below to get the list of culture type, is their a way on how to get just the country name? Thank you static void Main(string[] args) { StringBuilder sb = new StringBuilder(); foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.SpecificCultures)) { sb.Appen...

Globalize an input variable in Java

I am trying to make a lottery game in Java and it uses method calls instead of while loops for looping purposes. However, I cannot get an input variable( such as int bet = input.nextInt()) to be recognized as a variable for other methods. I do not know how to globalize "bet" so it can be used by all the methods instead of just in the met...

Strange assembly issue using WESTWIND globalization

I'm using Visual Studio 2010 Ultimate with version 4.0 of the .NET Framework. I'm attempting globalization for a website using the free westwind globalization dll. I add the Westwind.Web assembly then its two dependencies: Westwind.Globalization and Westwind.Utilities Initially, after adding the assemblies the objects are recognized...