Questions tagged [globalization]

The process of making an application suitable for use for a world-wide audience, regardless of culture.

Cultures world-wide differ in many ways beyond the language spoken by users.

Globalization (or globalisation) is the process of making software appropriate for many different cultures. This might include

  • ensuring left-to-right and right-to-left character sets and display layouts are supported
  • different sort orders and search conventions are honoured
  • using non-pejorative user interface conventions, e.g. avoiding use of certain colours
  • understanding different conventions for people's names
  • recognising different ways to identify buildings and companies

It can be contrasted with localization, which is the process of tailoring software software for a particular locale.

1436 questions
13
votes
3 answers

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,…
Scott Wisniewski
  • 24,561
  • 8
  • 60
  • 89
12
votes
3 answers

How can I convert a DateTime to a string with fractional seconds that is localized?

I have a DateTime object and I want to output the hour, minute, second, and fractional second as a string that is localized for the current culture. There are two issues with this. First issue is there is no standard DateTime format that will show…
Joel McBeth
  • 1,278
  • 16
  • 21
12
votes
1 answer

How to set collation for a connection in SQL Server?

How can i set the collation SQL Server will use for the duration of that connection? Not until i connect to SQL Server do i know what collation i want to use. e.g. a browser with language fr-IT has connected to the web-site. Any queries i run on…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
1 answer

How to make a dropdown list of all cultures (but no repeats)

I'm trying to make 2 dropdown lists. The top one offers all cultures, (but no repeats). Example: English, Spanish, Filipino After selecting from the top list the bottom list will show any specific types. I right now I use this code for my top…
aron
  • 2,856
  • 11
  • 49
  • 79
12
votes
3 answers

List of all available languages for Windows .NET framework

I've been searching for the answer over the net, but I don't seem to be able to find a comprehensive list of all languages available for my app with their exact display name. (I find many lists, but none of them seem to match the language strings I…
ib11
  • 2,530
  • 3
  • 22
  • 55
12
votes
3 answers

Why is my CurrentCulture en-GB and my CurrentUICulture en-US

I have a C# application which has to run on machines with different culture settings. No problem I thought, it will just lookup on start up what the current culture is on the machine, and do everything for me. Well no, it would seam that something…
SnAzBaZ
  • 6,389
  • 4
  • 23
  • 22
12
votes
2 answers

Set uiCulture automatically based on browser accept language

How I can set the culture of the ui automatically based on the users'browser? All I found about this is Globalize.culture("pt-BR"); But it sets pt-BR as default and I dont want set this by default! I want only set this if the user is pt-BR! How can…
MuriloKunze
  • 15,195
  • 17
  • 54
  • 82
12
votes
1 answer

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…
spmason
  • 4,048
  • 2
  • 24
  • 19
12
votes
3 answers

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…
toxaq
  • 6,745
  • 3
  • 46
  • 56
12
votes
8 answers

ASP.net controls not found in the code behind when implementing resources

Since we implemented globalization in our ASP.net website, we are getting some intellisense problems. When the resource is added to an asp.net control, we receive errors. Even though the error is shown in visual studio, the application works! For…
Schiavini
  • 2,869
  • 2
  • 23
  • 49
11
votes
4 answers

Should Exception Messages be Globalized

I'm working on a project and I'm just starting to do all the work necessary to globalize the application. One thing that comes up quite often is whether to globalize the exception messages, but ensuring that string.Format uses…
Orion Adrian
  • 19,053
  • 13
  • 51
  • 67
11
votes
2 answers

.NET RegionInfo class

When I try to create a new RegionInfo with certain ISO 3166 country codes ("BD" for Bangladesh, "SO" for Somalia, "LK" for Sri Lanka), I get an ArgumentException that says it's not recognized. What's the deal? The Intellisense of RegionInfo(string)…
core
  • 32,451
  • 45
  • 138
  • 193
11
votes
1 answer

Make URL language-specific (via routes)

Its hard to find an answer to this specific question, so ill pop it up here: We want to build up our urls completely language specific, meaning www.mysite.com/EN www.mysite.com/DE this is done in the RouteConfig with url:…
stefjnl
  • 732
  • 3
  • 14
  • 31
11
votes
6 answers

How Do You Write Code That Is Safe for UTF-8?

We have a set of applications that were developed for the ASCII character set. Now, we're trying to install it in Iceland, and are running into problems where the Icelandic characters are getting screwed up. We are working through our issues, but I…
Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
11
votes
6 answers

How to use NumberFormatInfo to remove parenthesis for negative values

We're currently using the following for creating US dollar values in our web application: string.Format("{0:C0}", dollarValue ); In this example, if dollarValue is 145, then we'll see: $145. If it is -145, then we'll see ($145) rather than -$145.…
Dan7el
  • 1,995
  • 5
  • 24
  • 46