]> git.openstreetmap.org Git - rails.git/blob - vendor/plugins/rails-i18n/locale/th.rb
b07f54807dc308b91ff97b117659ef62b16b9ae7
[rails.git] / vendor / plugins / rails-i18n / locale / th.rb
1 # Thai translation for Ruby on Rails
2 # original by Prem Sichanugrist (s@sikachu.com/sikandsak@gmail.com)
3 # activerecord keys fixed by Jittat Fakcharoenphol (jittat@gmail.com)
4 #
5 # Note: You must install i18n gem in order to use this language pack.
6 # If you're calling I18n.localize(Time.now), the year will be in Bhuddhist calendar
7
8 # This is used to DRY up ActiveRecord validation messages
9 unless defined?(ThaiLocaleI18n::ERROR_MESSAGES)
10   module ThaiLocaleI18n
11     ERROR_MESSAGES = {
12       :inclusion => "ไม่ได้อยู่ในรายการ",
13       :exclusion => "ไม่ได้รับอนุญาตให้ใช้",
14       :invalid => "ไม่ถูกต้อง",
15       :confirmation => "ไม่ตรงกับการยืนยัน",
16       :accepted => "ต้องถูกยอมรับ",
17       :empty => "ต้องไม่เว้นว่างเอาไว้",
18       :blank => "ต้องไม่เว้นว่างเอาไว้",
19       :too_long => "ยาวเกินไป (ต้องไม่เกิน %{count} ตัวอักษร)",
20       :too_short => "สั้นเกินไป (ต้องยาวกว่า %{count} ตัวอักษร)",
21       :wrong_length => "มีความยาวไม่ถูกต้อง (ต้องมีความยาว %{count} ตัวอักษร)",
22       :not_a_number => "ไม่ใช่ตัวเลข",
23       :not_an_integer => "ไม่ใช่จำนวนเต็ม",
24       :greater_than => "ต้องมากกว่า %{count}",
25       :greater_than_or_equal_to => "ต้องมากกว่าหรือเท่ากับ %{count}",
26       :equal_to => "ต้องมีค่าเท่ากับ %{count}",
27       :less_than => "ต้องมีค่าน้อยกว่า %{count}",
28       :less_than_or_equal_to => "ต้องมีค่าน้อยกว่าหรือเท่ากับ %{count}",
29       :odd => "ต้องเป็นจำนวนคี่",
30       :even => "ต้องเป็นจำนวนคู่",
31     }
32   end
33 end
34
35 { :'th' => {
36
37 :date => {
38   :formats => {
39     :default => lambda { |date, opts| "%d-%m-#{date.year + 543}" },
40     :short => "%d %b",
41     :long => lambda { |date, opts| "%d %B #{date.year + 543}" },
42   },
43
44   :day_names => ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัสบดี", "ศุกร์", "เสาร์"],
45   :abbr_day_names => ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"],
46
47   :month_names => [nil, "มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"],
48   :abbr_month_names => [nil, "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."],
49   :order => [:day, :month, :year]
50 },
51
52 :time => {
53   :formats => {
54     :default => lambda { |date, opts| "%a %d %b #{date.year + 543} %H:%M:%S %z" },
55     :short => "%d %b %H:%M น.",
56     :long => lambda { |date, opts| "%d %B #{date.year + 543} %H:%M น." },
57   },
58   :am => "ก่อนเที่ยง",
59   :pm => "หลังเที่ยง"
60 },
61
62 :support => {
63   :array => {
64     :words_connector => ", ",
65     :two_words_connector => " และ ",
66     :last_word_connector => ", และ ",
67   },
68
69   :select => {
70     :prompt => "โปรดเลือก"
71   }
72 },
73
74 :number => {
75   :format => {
76     :separator => ".",
77     :delimiter => ",",
78     :precision => 3,
79     :significant => false,
80     :strip_insignificant_zeros => false
81   },
82
83   :currency => {
84     :format => {
85       :format => "%n %u",
86       :unit => "บาท",
87       :separator => ".",
88       :delimiter => ",",
89       :precision => 2,
90       :significant => false,
91       :strip_insignificant_zeros => false
92     }
93   },
94
95   :percentage => {
96     :format => {
97       :delimiter => "",
98     }
99   },
100
101   :precision => {
102     :format => {
103       :delimiter => "",
104     }
105   },
106
107   :human => {
108     :format => {
109       :delimiter => "",
110       :precision => 3,
111       :significant => true,
112       :strip_insignificant_zeros => true
113     },
114     :storage_units => {
115       :format => "%n %u",
116       :units => {
117         :byte => "ไบต์",
118         :kb => "กิโลไบต์",
119         :mb => "เมกะไบต์",
120         :gb => "จิกะไบต์",
121         :tb => "เทระไบต์"
122       }
123     },
124
125     :decimal_units => {
126       :format => "%n %u",
127       :units => {
128         :unit => "",
129         :thousand => "พัน",
130         :million => "ล้าน",
131         :billion => "พันล้าน",
132         :trillion => "ล้านล้าน",
133         :quadrillion => "พันล้านล้าน"
134       }
135     }
136   }
137 },
138
139 :datetime => {
140   :distance_in_words => {
141     :half_a_minute => "ครึ่งนาที",
142     :less_than_x_seconds => "น้อยกว่า %{count} วินาที",
143     :x_seconds => "%{count} วินาที",
144     :less_than_x_minutes => "น้อยกว่า %{count} นาที",
145     :x_minutes => "%{count} นาที",
146     :about_x_hours => "ประมาณ %{count} ชั่วโมง",
147     :x_days => "%{count} วัน",
148     :about_x_months => "ประมาณ %{count} เดือน",
149     :x_months => "%{count} เดือน",
150     :about_x_years => "ประมาณ %{count} ปี",
151     :over_x_years => "มากกว่า %{count} ปี",
152     :almost_x_years => "เกือบ %{count} ปี",
153   },
154   :prompts => {
155     :year =>   "ปี",
156     :month =>  "เดือน",
157     :day =>    "วัน",
158     :hour =>   "ชั่วโมง",
159     :minute => "นาที",
160     :second => "วินาที",
161   }
162 },
163
164 :helpers => {
165   :select => {
166     :prompt => "โปรดเลือก"
167   },
168
169   :submit => {
170     :create => "สร้าง%{model}",
171     :update => "ปรับปรุง%{model}",
172     :submit => "บันทึก%{model}"
173   }
174 },
175
176 :errors => {
177   :format => "%{attribute} %{message}",
178   :messages => ThaiLocaleI18n::ERROR_MESSAGES
179 },
180
181 :activerecord => {
182   :errors => {
183     :template => {
184       :header => "พบข้อผิดพลาด %{count} ประการ ทำให้ไม่สามารถบันทึก%{model}ได้",
185       :body => "โปรดตรวจสอบข้อมูลในช่องต่อไปนี้:"
186     },
187
188     :messages => {
189       :taken => "ถูกใช้ไปแล้ว",
190       :record_invalid => "ไม่ผ่านการตรวจสอบ: %{errors}"
191     }.merge(ThaiLocaleI18n::ERROR_MESSAGES),
192
193     :full_messages => {
194       :format => "%{attribute} %{message}"
195     },
196   }
197 }
198
199 }}