New test.
[mono.git] / tools / locale-builder / RegionInfoEntry.cs
1 //
2 // Mono.Tools.LocaleBuilder.RegionInfoEntry
3 //
4 // Author(s):
5 //   Atsushi Enomoto  <atsushi@ximian.com>
6 //
7 // (C) 2005, Novell, Inc (http://www.novell.com)
8 //
9
10
11 using System;
12 using System.Text;
13 using System.Collections;
14
15 namespace Mono.Tools.LocaleBuilder
16 {
17         public class RegionInfoEntry : Entry
18         {
19                 public int RegionId; // numbered by alphabetical order of ISO2Name.
20                 // public byte MeasurementSystem;
21                 // public int GeoId;
22                 public string ISO2Name = String.Empty; // supplementalData.xml
23                 public string ISO3Name = String.Empty;
24                 public string Win3Name = String.Empty;
25                 public string EnglishName = String.Empty; // langs/en.xml
26                 public string CurrencySymbol = String.Empty;
27                 public string ISOCurrencySymbol = String.Empty; // supplementalData.xml
28                 public string CurrencyEnglishName = String.Empty; // langs/en.xml
29
30                 // NativeName and CurrencyNativeName are language dependent.
31
32                 public void AppendTableRow (StringBuilder builder)
33                 {
34                         builder.Append ("\t{");
35                         builder.Append (RegionId);
36                         builder.Append (',');
37                         // builder.Append (MeasurementSystem);
38                         // builder.Append (',');
39                         builder.Append (EncodeStringIdx (ISO2Name));
40                         builder.Append (',');
41                         builder.Append (EncodeStringIdx (ISO3Name));
42                         builder.Append (',');
43                         builder.Append (EncodeStringIdx (Win3Name));
44                         builder.Append (',');
45                         builder.Append (EncodeStringIdx (EnglishName));
46                         builder.Append (',');
47                         builder.Append (EncodeStringIdx (CurrencySymbol));
48                         builder.Append (',');
49                         builder.Append (EncodeStringIdx (ISOCurrencySymbol));
50                         builder.Append (',');
51                         builder.Append (EncodeStringIdx (CurrencyEnglishName));
52                         builder.Append ('}');
53                 }
54
55                 public override string ToString ()
56                 {
57                         StringBuilder builder = new StringBuilder ();
58                         AppendTableRow (builder);
59                         return builder.ToString ();
60                 }
61         }
62 }
63
64