diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 10:41:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 11:19:18 +0000 |
commit | c2866a9da4822fe886683efabe223db97d0296cb (patch) | |
tree | dcbdd5425431958f028fa2af7b70e858790b6d60 /include/i18nutil | |
parent | daaa6425ba689e69227751d4f4a719c01977ff1e (diff) |
Related: #i56998# provide a way to format % per-locale rules
Change-Id: Ic27b230cc9dce366f281ff720ded5873e94f6191
Diffstat (limited to 'include/i18nutil')
-rw-r--r-- | include/i18nutil/unicode.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/i18nutil/unicode.hxx b/include/i18nutil/unicode.hxx index ae1ad060f2f2..e3210390e2eb 100644 --- a/include/i18nutil/unicode.hxx +++ b/include/i18nutil/unicode.hxx @@ -24,6 +24,8 @@ #include <unicode/uscript.h> #include <i18nutil/i18nutildllapi.h> +class LanguageTag; + typedef struct _ScriptTypeList { sal_Int16 from; sal_Int16 to; @@ -54,6 +56,11 @@ public: //Return a language that can be written in a given ISO 15924 script code static OString SAL_CALL getExemplarLanguageForUScriptCode(UScriptCode eScript); + + //Format a number as a percentage according to the rules of the given + //language, e.g. 100 -> "100%" for en-US vs "100 %" for de-DE + static OUString SAL_CALL formatPercent(double dNumber, + const LanguageTag &rLangTag); }; #endif |