Index: runtime/bin/platform_win.cc |
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc |
index 18526517e9ff2bd72c742d36a6a46bfdd3d30805..8ec32d24e1d9c23cf1d493f5dc3e2689692eab76 100644 |
--- a/runtime/bin/platform_win.cc |
+++ b/runtime/bin/platform_win.cc |
@@ -198,6 +198,16 @@ const char* Platform::LibraryExtension() { |
} |
+const char* Platform::LocaleName() { |
+ wchar_t locale_name[LOCALE_NAME_MAX_LENGTH]; |
+ int result = GetUserDefaultLocaleName(locale_name, LOCALE_NAME_MAX_LENGTH); |
+ if (result == 0) { |
+ return NULL; |
+ } |
+ return StringUtilsWin::WideToUtf8(locale_name); |
+} |
+ |
+ |
bool Platform::LocalHostname(char* buffer, intptr_t buffer_length) { |
#if defined(DART_IO_DISABLED) || defined(PLATFORM_DISABLE_SOCKET) |
return false; |