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
22
votes
2 answers

When should I specify CurrentCulture or InvariantCulture and when should I leave it unspecified?

What is the best practice for specifying CurrentCulture or InvariantCulture and not specifying the culture at all? From what I have read, if you're doing serialization, for instance, you need InvariantCulture as a means of specifying a canonical…
Scott Stafford
  • 43,764
  • 28
  • 129
  • 177
22
votes
3 answers

How to access global resources in a view using asp.net mvc razor

Using ASP.NET MVC Razor, I have a resource file in App_GlobalResources named General.resx and General.fr.resx with a name value pairings of "Hello" and "Hello" and "Hello" and "Bonjour". How do I reference these from my view? These do not…
FiveTools
  • 5,970
  • 15
  • 62
  • 84
21
votes
4 answers

What is the best way to localize a WPF application, sans LocBAML?

There seems to be no good way to localize a WPF application. MSDN seems to think that littering my XAML with x:Uid's, generating CSV files, and then generating new assemblies (using their sample code!) is the answer. Worse, this process doesn't…
Cory R. King
  • 2,766
  • 1
  • 24
  • 22
21
votes
1 answer

Why is ᏌᏊ ᎢᏳᎾᎵᏍᏔᏅ ᏍᎦᏚᎩ the native name of the U.S.?

When I use this code: var ri = new RegionInfo("us"); var nativeName = ri.NativeName; // ᏌᏊ ᎢᏳᎾᎵᏍᏔᏅ ᏍᎦᏚᎩ why is nativeName then the string "ᏌᏊ ᎢᏳᎾᎵᏍᏔᏅ ᏍᎦᏚᎩ" (in Cherokee)? If I change to new RegionInfo("US") (only difference, capital US), I get…
Jeppe Stig Nielsen
  • 60,409
  • 11
  • 110
  • 181
21
votes
2 answers

No service for type 'Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer' has been registered

I try with ASP.Core to have a multilanguages website. So, I have in my StartUp.cs: public void ConfigureServices(IServiceCollection services) { services.AddLocalization(); services.Configure( opts => { …
20
votes
2 answers

What is the best way to handle validation with different culture

I am trying to build a multilingual MVC application. I have a form in my application and I have field to enter a cost. I am able to create a record using the spanish culture. But on trying to update the record I am getting jquery validation false.…
Jayaraj.K
  • 928
  • 9
  • 30
20
votes
3 answers

CultureAndRegionInfoBuilder doesn't exist

Okay, this is a strange one. I'm trying to create a custom culture using: using System.Globalization; ... var x = new CultureAndRegionInfoBuilder(); But I get the nasty red Resharper error with no options. The type or namespace name…
Chris Haines
  • 6,445
  • 5
  • 49
  • 62
20
votes
13 answers

Handling timezones in storage?

Store everything in GMT? Store everything the way it was entered with an embedded offset? Do the math everytime you render? Display relative Times "1 minutes ago"?
DevelopingChris
  • 39,797
  • 30
  • 87
  • 118
19
votes
10 answers

Implementing internationalization (language strings) in a PHP application

I want to build a CMS that can handle fetching locale strings to support internationalization. I plan on storing the strings in a database, and then placing a key/value cache like memcache in between the database and the application to prevent…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
19
votes
7 answers

protobuf-net does not deserialize DateTime.Kind correctly

using protobuf-net.dll Version 1.0.0.280 When I deserialize a DateTime (wrapped in an object), the date/time is ok but the DateTime.Kind property is 'Unspecified' Consider this test case to serialize/deserialize a DateTime. [TestMethod] public void…
wal
  • 17,409
  • 8
  • 74
  • 109
19
votes
2 answers

Should I use DateTime.Now or DateTime.UtcNow in HttpCookie.Expires and HttpCachePolicy.SetExpires?

Should I use DateTime.Now or DateTime.UtcNow in HttpCookie.Expires and HttpCachePolicy.SetExpires? Cookies are sending 'GMT' time, but I don't know what happen if I send DateTime.Now.AddDays(3) if I would be in GMT+5. Same with Expires HTTP header…
vtortola
  • 34,709
  • 29
  • 161
  • 263
19
votes
2 answers

Invalid CultureInfo no longer throws CultureNotFoundException

Creating a culture info with es-CA, which obviously is incorrect should throw an exception, but no longer does. This previously threw a CultureNotFoundException: new CultureInfo("es-CA"). It now seem to fall back to es with an "Unknown Locale".…
Filip Ekberg
  • 36,033
  • 20
  • 126
  • 183
19
votes
3 answers

Translate custom attributes with i18next (placeholder, value)

I am investigating what is possible with i18next localization library. Right now I have the following code (full Fiddle is here): HTML
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
18
votes
6 answers

How to get country name

I used the code below to get the list of culture type, is there 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…
xscape
  • 3,318
  • 9
  • 45
  • 86
18
votes
4 answers

The field must be a number

I have this field: public decimal Price { get; set; } in Database it is decimal (7,2). View: @Html.EditorFor(model => model.Price, new { htmlAttributes = new { @class = "form-control" } }) If i put a value with comma, MVC default…
developer033
  • 24,267
  • 8
  • 82
  • 108