globalization

Unit-Testing local and global resources in asp.net mvc

I have a class that wraps the GetGlobalResourceObject and GetLocalResourceObjet so they can be used easily in MVC. The model validation classes then load the error messages dynamically from resource files. The problem is unit testing. The code uses "~/", and while everything functions correctly when the solution is run, I cannot see h...

Converting from globalized date/time format (maybe ISO8601) to SQL Server datetime type

Is there a string format to represent a datetime that SQL will be able to parse and convert into another offset (EST -> UTC for example). I have a string from the user such as: declare @p1 varchar(50); declare @utcDateTime datetime; set @p1 = "2009-06-26 14:30:00.000Z-4:00"; -- could be ISO8601 -- what do I do here to convert @p1? ...

Globalization, cache control, and HTTP dates in browsers

I am in need of education about browsers and how they send up dates in HTTP headers. I am worried that I will not be able to do a string comparison if the user has a different browser or localization. Currently, I have code something like this to handle requests: DateTime dt = getLastModified(someResourceHandle); if(Request.Headers["I...

HttpContext.GetGlobalResourceObject always returns null.

Hi folks! I created two files in the App_GlobalResources folder: SiteResources.en-US.resx SiteResources.sp-SP.resx Both contain a value for "SiteTitleSeparator". Here is what I am trying to do (The following line always returns null): string sep = (string)GetGlobalResourceObject("SiteResources", "SiteTitle"); Note, that the Cultu...

Process.Start specify culture

In one webapplication i have a IHttpHandler that when invoked starts an regular application that connects to a firebird database and amongst other things parses some dates from the database. When run from the desktop the application does what is should without any problem. But when it is started from the httpHandler is ends up with the ...

IIS VS 2008 / Web.config - wrong date format

Hi there, can anyone help. I have recently moved servers, its IIS7 rather that our previous IIS6 but everything else is the same, i have set the region to the UK and all date formats plus system local .. I mean everything .. But when a webpage asp.net is running on IIS7 it thinks the dates are another format.. This is really puzzling ...

ASP.NET server side culture

Hi, I have an application that runs on an English-US ASP.NET server (English installation of windows server and .NET Framework). I set the globalization settings to : <globalization culture="auto" uiCulture="auto" responseEncoding="utf-8"/> which works fine for most of the application. However, I have to deal with money transactions ...

ASP.NET Localizations and User definded language.

I'm working on a asp.net web application and one of the requirements is that the user has to be able to select the language they want. I"m using Resx files to store the locals. What my question is do I need to change the CurrentCulture of the thread every time a page is loaded or is there a way to have it handled automatically when a lo...

How to configure invariant culture in ASP.NET globalization?

I need to fix CurrentCulture as the invariant culture in an ASP.NET application. How can I do this? <configuration> <system.web> <globalization culture="???" /> ... ...

.resx file the page is currently using

How do you get the .resx file the page is currently using? For example, if I set culture to fr-FR on Default.aspx, it should give me Default.aspx.fr.resx or Default.aspx.fr-FR.resx or Default.aspx.resx depends on which one exists. Do they have something like that in ASP.NET or I have to write it myself? ...

CultureInfo & DateTimeInfo: How to check if is 24 hour time?

I'm modifying a globalized web application which uses stored CultureInfo for each logged in user. The client would like time data entry to be localized. Displaying is not a problem as the formatting is already available. However I need to detect if the current cultureinfo is for 24 hour time or am/pm so I can display the correct input ...

Is there any way to detect an RTL language in .NET?

I need to be able to detect whether the current language my user is viewing is an RTL (Right To Left) language like Arabic, so I can include a specific CSS file in my pages. At the moment I'm just detecting this based on the language code of the CultureInfo object, but there must be a better way? ...

change language

hi how to change the language in iPhone application ?. i mean eg : in my application one label is there i want put a dutch word . what is the easy way. read from property file make one static class in project with string variable. or is possible any change in property file. pls help me... thnx and regards all ...

Localizing and Globalization of WinForms applications

Hi, We've developed a WinForms application (targeting .NET 2.0 with VS2008), we've just found out that we need to localize it for use in another language (other than english) :( What are the guidelines for developing multi-lingual languages in .NET? Another application borrows Paint.NET's idea of globalization (using resources) but I w...

Localizing Date Ranges

Does anyone know how to localize date ranges using C#? In particular, I want to generate "smart" date ranges, so that redundant information is eliminated. Here are some examples in US English August - Sept, 2009 August 2009 August 1 - 9, 2009 January 1 - March 3, 2009 December 6, 2009 - January 8, 2010 Form what I can tell the .NE...

Page.UICulture -- How do I retrieve the Two Letter UICulture Code?

In ASP.NET webforms, when setting UICulture="en" in the @Page directive, a Response.Write(Page.UICulture) returns the string "English" instead of the two letter language code "en". Is the the only way to return the two letter language name by using this? CultureInfo.CurrentUICulture.TwoLetterISOLanguageName Or is there a better / mor...

ASP.NET resource expression not returning correct Culture value

Hi, I'm using the Resource expression directives in an ASP.NET page that has four global resource files, neutral, UK, US and Italian. However, using the expression syntax always returns US. Some code for the ASPX page: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GlobalisationResources._Default"...

updated acts_as_versioned_association

hi has anyone got a acts_as_versioned or acts_as_audited that supports the models associtions ? like the acts_as_versioned_association but this doesnt work in rails 2 + ? Also can you use globalize2 with any of these plugins ? Does anyone have any experience using versions and globalize2 ? thanks alot rick ...

Forcing a culture on an application

How can I force and application and any threads that are started by that application to run under a specific culture? I have tried the following but I still get exceptions in English. My understanding was that the wording on exceptions are translated using the active culture. static void Main(string[] args) { Thread.C...

Globalization and links in sentences

I am working on globalizing/localizing an asp.net application with C# as the backend. We are in the process of extracting strings to a resource file, and have run into a problem. We are trying to keep sentences together so that they are translatable, but this is not possible with links. For Example: <%= Strings.BeginningOfSentence %>...