Guessing the locale of a logfile

I got a question about my DNS Debug script, which parses the DNS logfile so it is easier to find what is happening in the DNS. A nice guy was having issues with a log file. So he sent over a few row.

Okey lets be honest it took me to get around to it. There is a thing called Corona making all the headlines right now 🙁

Anyway since he sent it in on the 6 of March 2020.. I had good guess about the date formatting being dd-MM-yyyy. But that didn’t really help me. So I sent Marc a message, but then I thought.. I know that Windows knows about 428 locales. I’m in a quarantine anyway, I can do this. Then I thought again, I have a computer with Powershell.

And this is the 52 entries i got:

NameDisplayNameDateTimeFormat
azAzerbaijanidd.MM.yyyy
az-CyrlAzerbaijani (Cyrillic)dd.MM.yyyy
az-Cyrl-AZAzerbaijani (Cyrillic, Azerbaijan)dd.MM.yyyy
az-LatnAzerbaijani (Latin)dd.MM.yyyy
az-Latn-AZAzerbaijani (Latin, Azerbaijan)dd.MM.yyyy
csCzechdd.MM.yyyy
cs-CZCzech (Czech Republic)dd.MM.yyyy
deGermandd.MM.yyyy
de-ATGerman (Austria)dd.MM.yyyy
de-CHGerman (Switzerland)dd.MM.yyyy
de-DEGerman (Germany)dd.MM.yyyy
de-LIGerman (Liechtenstein)dd.MM.yyyy
de-LUGerman (Luxembourg)dd.MM.yyyy
etEstoniandd.MM.yyyy
et-EEEstonian (Estonia)dd.MM.yyyy
foFaroesedd.MM.yyyy
fo-FOFaroese (Faroe Islands)dd.MM.yyyy
fr-CHFrench (Switzerland)dd.MM.yyyy
gswAlsatiandd.MM.yyyy
hyArmeniandd.MM.yyyy
hy-AMArmenian (Armenia)dd.MM.yyyy
it-CHItalian (Switzerland)dd.MM.yyyy
kaGeorgiandd.MM.yyyy
ka-GEGeorgian (Georgia)dd.MM.yyyy
kkKazakhdd.MM.yyyy
kk-KZKazakh (Kazakhstan)dd.MM.yyyy
lvLatviandd.MM.yyyy
lv-LVLatvian (Latvia)dd.MM.yyyy
nbNorwegian (Bokmål)dd.MM.yyyy
nb-NONorwegian, Bokmål (Norway)dd.MM.yyyy
nnNorwegian (Nynorsk)dd.MM.yyyy
nn-NONorwegian, Nynorsk (Norway)dd.MM.yyyy
noNorwegiandd.MM.yyyy
plPolishdd.MM.yyyy
pl-PLPolish (Poland)dd.MM.yyyy
roRomaniandd.MM.yyyy
ro-MDRomanian (Moldova)dd.MM.yyyy
ro-RORomanian (Romania)dd.MM.yyyy
ruRussiandd.MM.yyyy
ru-MDRussian (Moldova)dd.MM.yyyy
ru-RURussian (Russia)dd.MM.yyyy
sahSakhadd.MM.yyyy
sah-RUSakha (Russia)dd.MM.yyyy
sma-NOSami, Southern (Norway)dd.MM.yyyy
smj-NOSami, Lule (Norway)dd.MM.yyyy
tgTajikdd.MM.yyyy
tg-CyrlTajik (Cyrillic)dd.MM.yyyy
tg-Cyrl-TJTajik (Cyrillic, Tajikistan)dd.MM.yyyy
ttTatardd.MM.yyyy
tt-RUTatar (Russia)dd.MM.yyyy
ukUkrainiandd.MM.yyyy
uk-UAUkrainian (Ukraine)dd.MM.yyyy

So when I had gotten the list I could just try with a Locale and it worked. I later learned that the server was a German with the locale de-DE.

But now I know how to easy see what locale it might be 🙂

Leave a Reply