diff options
Diffstat (limited to 'WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp')
-rw-r--r-- | WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp b/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp index 4e2aceb..9adb999 100644 --- a/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp +++ b/WebCore/platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp @@ -22,18 +22,29 @@ #include "config.h" #include "TextBreakIteratorInternalICU.h" +#include "CString.h" +#include "Language.h" +#include "PlatformString.h" +#include <wtf/StdLibExtras.h> + namespace WebCore { +static const char* UILanguage() +{ + // Chrome's UI language can be different from the OS UI language on Windows. + // We want to return Chrome's UI language here. + DEFINE_STATIC_LOCAL(CString, locale, (defaultLanguage().latin1())); + return locale.data(); +} + const char* currentSearchLocaleID() { - // FIXME: Should use system locale. - return ""; + return UILanguage(); } const char* currentTextBreakLocaleID() { - // FIXME: Should use system locale. - return "en_us"; + return UILanguage(); } } // namespace WebCore |