Does Microsoft publish a list of localized month/ day names
I would like to have a table / database of localized month/ day names (I am using Windows). I can create this list using a software and the Windows API, but before I venture there, I wonder if there is a public list from Microsoft of
- Month Long Name
- Month Short Name
- Day Long Name
- Day Short Name
.. based on locale.
Or, does microsoft simply implement the Unicode CLDR definitions ?
Solution 1:
You can use Powershell to get the long and short month and day' names all locales. Open Powershell and enter the following:
[System.Globalization.CultureInfo]::GetCultures([System.Globalization.CultureTypes]::AllCultures) |
foreach { $a = $_.DisplayName;
$b = $_.DateTimeFormat.MonthNames;
$c = $_.DateTimeFormat.AbbreviatedMonthNames;
$d = $_.DateTimeFormat.DayNames;
$e = $_.DateTimeFormat.AbbreviatedDayNames;
write "Name: $a `n`tMonths Long Name: $b `n`tMonths Short Name: $c`n`tDays Long Name: $d`n`tDays Short Name: $e`n"
} | Out-File locales.txt
The result is exported to a file named locales.txt
If, for example, you want to obtain only for fr-Fr
or ja-JP
:
[System.Globalization.CultureInfo]::GetCultures([System.Globalization.CultureTypes]::AllCultures) |
where{ $_.Name -eq 'fr-FR' -or $_.Name -eq 'ja-JP' } |
foreach { $a = $_.DisplayName;
$b = $_.DateTimeFormat.MonthNames;
$c = $_.DateTimeFormat.AbbreviatedMonthNames;
$d = $_.DateTimeFormat.DayNames;
$e = $_.DateTimeFormat.AbbreviatedDayNames;
write "Name: $a `n`tMonths Long Name: $b `n`tMonths Short Name: $c`n`tDays Long Name: $d`n`tDays Short Name: $e`n"
} | Out-File locales.txt