4

Setup:

GUI version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL compiled from EmacsW64.

Windows 7 x64 Dutch version.

Situation:

When I'm evaluating the following snippet:

(format-time-string "%B")

It gives me "August" as result. In the Dutch language, we have "augustus" (spelled in another way, and without any case).

And my operating system is also in Dutch language. When I tried (setq system-time-locale "nl_NL") to no avail. When I check the value of current-language-environment, it gives me UTF-8 as value.

Another suggestions to get the days/months displayed in Dutch?

Update:

things are getting weird. On the Windows with the Dutch language (my work pc), I get "August". On my home pc with Windows with the English language, I get "augustus". And it's with the same Emacs configuration. So I guess it's not related to the operating system.

  • "nl_NL" might not be a locale that MS Windows knows about. Windows uses some non-standard aliases for locale names. I found this page, but I don't use Windows and wouldn't be able to figure out what in that table is the actual locale name: msdn.microsoft.com/en-us/library/dd318693.aspx – wvxvw Aug 27 '15 at 13:34
  • It should use language according locale settings on Unix-like systems. Not sure about Windows. – Mark Karpov Aug 27 '15 at 13:34
2
+50

Have you tried setting environment variable LANG to your language? Similarly, variables LC_TIME etc. - see the Emacs manual, node General Variables. That node also mentions MS Windows in particular: Control Panel > Regional Settings.

See also node Language Environments.

If this helps, it might help to know that I found these nodes (and more) by using i in the Emacs manual. I typed locale at the prompt. TAB then shows you index entries that start with locale.

(Since I use Icicles, I use S-TAB to see index entries that match locale also as a substring, which picks up a couple more entries, such as set-locale-environment.)

  • That was the answer. I noticed that I have set the environment variable LANG to C in Windows. I deleted that variable. After restarting the computer, I get the Dutch spelling for months. Your tip solved my question enventually, so thanks for your answer. And 50 bonud added too. Your contributions to Emacs community are really appreciated. – ReneFroger Sep 1 '15 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.