blob: 43caf225bff3a91a14cbd4e8be61885a75097411 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#if defined(OS_CHROMEOS)
#include "base/basictypes.h"
#include "base/string_util.h"
#endif
namespace l10n_util {
// Return true blindly for now.
bool IsLocaleSupportedByOS(const std::string& locale) {
#if !defined(OS_CHROMEOS)
return true;
#else
// We don't have translations yet for am, and sw.
// TODO(jungshik): Once the above issues are resolved, change this back
// to return true.
static const char* kUnsupportedLocales[] = {"am", "sw"};
for (size_t i = 0; i < arraysize(kUnsupportedLocales); ++i) {
if (LowerCaseEqualsASCII(locale, kUnsupportedLocales[i]))
return false;
}
return true;
#endif
}
} // namespace l10n_util
|