Modern applications are used by people from different countries, cultures, and languages.
ASP.NET Core provides built-in support for making your application culture- and language-aware.
What is Globalization?
Globalization is the process of designing an application to support multiple cultures.
It deals with:
Date & time formats
Number formats
Currency
Culture-specific rules
Example:
US Date →
12/31/2026India Date →
31/12/2026Currency →
$100vs₹100
What is Localization?
Localization means adapting the application to a specific language or region.
It focuses on:
Translated text
Culture-specific resources
Language selection
Example:
English → “Welcome”
French → “Bienvenue”
Spanish → “Bienvenido”
Difference Between Globalization and Localization
| Feature | Globalization | Localization |
|---|---|---|
| Purpose | Culture support | Language support |
| Scope | Formats & rules | Text & UI |
| Example | Date, currency | Messages, labels |
Real-World Scenario
An e-commerce website supports:
English (US)
French (France)
Arabic (Saudi Arabia)
Users see:
Product prices in correct currency
Dates in local format
UI text in their language
Culture and Language in ASP.NET Core
ASP.NET Core uses:
Culture → formatting (
en-US,fr-FR)UICulture → UI language
Example culture codes:
en-US→ English (United States)fr-FR→ French (France)ar-SA→ Arabic (Saudi Arabia)
Enable Localization in ASP.NET Core
Step 1: Add Localization Services
builder.Services.AddLocalization(options =>
{
options.ResourcesPath = "Resources";
});
Step 2: Configure Supported Cultures
using Microsoft.AspNetCore.Localization;
using System.Globalization;
var supportedCultures = new[]
{
new CultureInfo("en-US"),
new CultureInfo("fr-FR"),
new CultureInfo("ar-SA")
};
var localizationOptions = new RequestLocalizationOptions
{
DefaultRequestCulture = new RequestCulture("en-US"),
SupportedCultures = supportedCultures,
SupportedUICultures = supportedCultures
};
app.UseRequestLocalization(localizationOptions);
How Culture is Selected
ASP.NET Core determines culture from:
Query string
Cookies
Request headers (
Accept-Language)
Example Header
Accept-Language: fr-FR
Localization Using Resource Files (.resx)
Step 1: Create Resources Folder
Resources/
└── Controllers.HomeController.en-US.resx
└── Controllers.HomeController.fr-FR.resx
Step 2: Add Resource Keys
English (en-US)

Join the conversation! Your thoughts help the community grow.