Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / l10n / l10n_util_plurals.h
blobefae5d685ab057a3945c7819f3e1e2ec5ecb6578
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains utility functions for dealing with pluralization of
6 // localized content.
8 #ifndef UI_BASE_L10N_L10N_UTIL_PLURALS_H_
9 #define UI_BASE_L10N_L10N_UTIL_PLURALS_H_
11 #include <string>
12 #include <vector>
14 #include "base/memory/scoped_ptr.h"
15 #include "third_party/icu/source/i18n/unicode/msgfmt.h"
16 #include "third_party/icu/source/i18n/unicode/plurrule.h"
18 namespace l10n_util {
20 // Returns a PluralRules for the current locale.
21 scoped_ptr<icu::PluralRules> BuildPluralRules();
23 // Formats |number| using MessageFormat |format| and appends the result
24 // to |append_to|.
25 // |format| has to be generated with ICU's plural message format.
26 // See http://userguide.icu-project.org/formatparse/messages
27 void FormatNumberInPlural(const icu::MessageFormat& format, int number,
28 icu::UnicodeString* append_to, UErrorCode* err);
30 } // namespace l10n_util
32 #endif // UI_BASE_L10N_L10N_UTIL_PLURALS_H_