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
62
votes
3 answers

Detect decimal separator

I have to detect decimal separator in current windows setting. Im using visual studio 2010, windows form. In particular, if DecimalSeparator is comma, if user input dot in textbox1, I need show zero in textbox2. I tryed with this code, but not…
Vincenzo Lo Palo
  • 1,341
  • 5
  • 19
  • 32
55
votes
11 answers

Converting country codes in .NET

In .NET is there any way to convert from three letter country codes (defined in ISO 3166-1 alpha-3) to two letter language codes (defined in ISO 3166-1 alpha-2) eg. convert BEL to BE? Have looked at the RegionInfo class in System.Globalization but…
flalar
  • 1,181
  • 3
  • 12
  • 23
42
votes
13 answers

Regular expression for validating names and surnames?

Although this seems like a trivial question, I am quite sure it is not :) I need to validate names and surnames of people from all over the world. Imagine a huge list of miilions of names and surnames where I need to remove as well as possible any…
Sklivvz
  • 30,601
  • 24
  • 116
  • 172
42
votes
7 answers

How to convert string to double with proper cultureinfo

I have two nvarchar fields in a database to store the DataType and DefaultValue, and 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…
Vinay Pandey
  • 8,589
  • 9
  • 36
  • 54
39
votes
3 answers

How do I set CultureInfo.CurrentCulture from an App.Config file?

I need to set my application's culture through an App.Config file, so that "pt-BR" is used automatically for parsing dates without the need to manually inform the culture for each operation. As far as I know, there's a globalization section that can…
Andre Pena
  • 56,650
  • 48
  • 196
  • 243
39
votes
6 answers

What is the "best" way to store international addresses in a database?

What is the "best" way to store international addresses in a database? Answer in the form of a schema and an explanation of the reasons why you chose to normalize (or not) the way you did. Also explain why you chose the type and length of each…
rmontgomery429
  • 14,660
  • 17
  • 61
  • 66
39
votes
3 answers

Difference between CultureInfo.CreateSpecificCulture() and the constructor of the class?

The class CultureInfo provides two way of creation: via a factory method CreateSpecificCulture(string). via a constructor with a string argument The MSDN documentation does slightly differ for the two, mentioning some "Windows culture" for the…
Marcel
  • 15,039
  • 20
  • 92
  • 150
37
votes
5 answers

.resx vs database vs custom solution for providing Localization/Globalization

At my office, we have had a long-standing debate about Localization/Globalization and how to handle it. One side pushes for the Resource (.resx) file route built in to ASP.NET, one side pushes for a database driven solution. A third group believes…
trelston
  • 633
  • 1
  • 5
  • 13
37
votes
1 answer

Are there built-in Month name declensions in C#

I'm wondering if there's any built-in functionality in .NET for declining dates in languages that support noun declensions, (ie. In Russian the month name is февраль, but if I wanted to say the date or say that something is due by, I'd use the form…
Kolichikov
  • 2,944
  • 31
  • 46
37
votes
5 answers

How to get the country code from CultureInfo?

I have the following: System.Globalization.CultureInfo c = new System.Globalization.CultureInfo("en-GB"); var a = c.DisplayName; var b = c.EnglishName; var d = c.LCID; var e = c.Name; var f = c.NativeName; var g = c.TextInfo; var h =…
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
36
votes
2 answers

ASP.NET - MVC 3: Localization

I am about to implement localization for my MVC3 web application. Googling my way through large amounts of ways to do it, I was left unsure which way to implement this. I found few ways how to do it: First option I found was to use…
Esa
  • 1,636
  • 3
  • 19
  • 23
35
votes
4 answers

Prevent exception messages from being translated into the user's language?

How do I make my application always use English when displaying win32/.net exceptions messages? I got this message, it looks like someone used babelfish to translate it (it's Swedish): "System.ComponentModel.Win32Exception: Programmet kunde inte…
Nifle
  • 11,745
  • 10
  • 75
  • 100
33
votes
5 answers

Can You Determine Timezone from Request Variables?

Is there a way to do your timezone offsets on the server side, by reading something in the request over http, instead of sending everything to the client and letting it deal with it?
DevelopingChris
  • 39,797
  • 30
  • 87
  • 118
33
votes
6 answers

.NET: Are there any differences between InvariantCulture and en-US?

Given the following two cultures: CultureInfo c1 = InvariantCulture; CultureInfo c2 = new CultureInfo("en-US"); and i were to examine every piece of information specific to both cultures,…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
32
votes
2 answers

Locale during unit test on Android

I have some code I want to test. I want to check if a String is properly composed out of various strings that I have in resources. The challenge here is to deal with multiple translations in my resources. I know that locale can be an issue when…
Xilconic
  • 3,785
  • 4
  • 26
  • 35
1
2
3
95 96