OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Google Inc. | 3 * Copyright (C) 2008, 2009 Google Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "wtf/StdLibExtras.h" | 26 #include "wtf/StdLibExtras.h" |
27 #include "wtf/text/CString.h" | 27 #include "wtf/text/CString.h" |
28 #include "wtf/text/WTFString.h" | 28 #include "wtf/text/WTFString.h" |
29 | 29 |
30 namespace WebCore { | 30 namespace WebCore { |
31 | 31 |
32 static const char* UILanguage() | 32 static const char* UILanguage() |
33 { | 33 { |
34 // Chrome's UI language can be different from the OS UI language on Windows. | 34 // Chrome's UI language can be different from the OS UI language on Windows. |
35 // We want to return Chrome's UI language here. | 35 // We want to return Chrome's UI language here. |
36 DEFINE_STATIC_LOCAL(CString, locale, (defaultLanguage().latin1())); | 36 DEFINE_STATIC_LOCAL(CString, locale, (defaultLanguage().string().latin1())); |
37 return locale.data(); | 37 return locale.data(); |
38 } | 38 } |
39 | 39 |
40 const char* currentSearchLocaleID() | 40 const char* currentSearchLocaleID() |
41 { | 41 { |
42 return UILanguage(); | 42 return UILanguage(); |
43 } | 43 } |
44 | 44 |
45 const char* currentTextBreakLocaleID() | 45 const char* currentTextBreakLocaleID() |
46 { | 46 { |
47 return UILanguage(); | 47 return UILanguage(); |
48 } | 48 } |
49 | 49 |
50 } // namespace WebCore | 50 } // namespace WebCore |
OLD | NEW |