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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef CORE_FXCRT_IFX_LOCALE_H_
#define CORE_FXCRT_IFX_LOCALE_H_
#include "core/fxcrt/cfx_datetime.h"
#include "core/fxcrt/fx_string.h"
enum FX_LOCALENUMSYMBOL {
FX_LOCALENUMSYMBOL_Decimal,
FX_LOCALENUMSYMBOL_Grouping,
FX_LOCALENUMSYMBOL_Percent,
FX_LOCALENUMSYMBOL_Minus,
FX_LOCALENUMSYMBOL_Zero,
FX_LOCALENUMSYMBOL_CurrencySymbol,
FX_LOCALENUMSYMBOL_CurrencyName,
};
enum FX_LOCALEDATETIMESUBCATEGORY {
FX_LOCALEDATETIMESUBCATEGORY_Default,
FX_LOCALEDATETIMESUBCATEGORY_Short,
FX_LOCALEDATETIMESUBCATEGORY_Medium,
FX_LOCALEDATETIMESUBCATEGORY_Full,
FX_LOCALEDATETIMESUBCATEGORY_Long,
};
enum FX_LOCALENUMSUBCATEGORY {
FX_LOCALENUMPATTERN_Percent,
FX_LOCALENUMPATTERN_Currency,
FX_LOCALENUMPATTERN_Decimal,
FX_LOCALENUMPATTERN_Integer,
};
enum FX_LOCALECATEGORY {
FX_LOCALECATEGORY_Unknown,
FX_LOCALECATEGORY_Date,
FX_LOCALECATEGORY_Time,
FX_LOCALECATEGORY_DateTime,
FX_LOCALECATEGORY_Num,
FX_LOCALECATEGORY_Text,
FX_LOCALECATEGORY_Zero,
FX_LOCALECATEGORY_Null,
};
enum FX_DATETIMETYPE {
FX_DATETIMETYPE_Unknown,
FX_DATETIMETYPE_Date,
FX_DATETIMETYPE_Time,
FX_DATETIMETYPE_DateTime,
FX_DATETIMETYPE_TimeDate,
};
class IFX_Locale {
public:
virtual ~IFX_Locale() {}
virtual CFX_WideString GetName() const = 0;
virtual CFX_WideString GetNumbericSymbol(FX_LOCALENUMSYMBOL eType) const = 0;
virtual CFX_WideString GetDateTimeSymbols() const = 0;
virtual CFX_WideString GetMonthName(int32_t nMonth, bool bAbbr) const = 0;
virtual CFX_WideString GetDayName(int32_t nWeek, bool bAbbr) const = 0;
virtual CFX_WideString GetMeridiemName(bool bAM) const = 0;
virtual FX_TIMEZONE GetTimeZone() const = 0;
virtual CFX_WideString GetEraName(bool bAD) const = 0;
virtual CFX_WideString GetDatePattern(
FX_LOCALEDATETIMESUBCATEGORY eType) const = 0;
virtual CFX_WideString GetTimePattern(
FX_LOCALEDATETIMESUBCATEGORY eType) const = 0;
virtual CFX_WideString GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const = 0;
};
#endif // CORE_FXCRT_IFX_LOCALE_H_
|