Selaa lähdekoodia

Merge pull request #191 from Lykeosovandara/master

add suport for khmer localization
刘彦博 4 vuotta sitten
vanhempi
commit
7a66eeecd2
2 muutettua tiedostoa jossa 142 lisäystä ja 8 poistoa
  1. 1 0
      README.md
  2. 141 8
      lib/src/i18n_model.dart

+ 1 - 0
README.md

@@ -34,6 +34,7 @@ you can choose date / time / date&time in multiple languages:
 - Thai(th)
 - Turkish(tr)
 - Vietnamese(vi)
+- Khmer(kh)
 
 
 and you can also custom your own picker content

+ 141 - 8
lib/src/i18n_model.dart

@@ -31,10 +31,47 @@ enum LocaleType {
   no,
   sq,
   sv,
+  kh,
   tw
 }
 
 final _i18nModel = {
+  'kh': {
+    'cancel': 'បោះបង់',
+    'done': 'រួចរាល់',
+    'today': 'ថ្ងៃនេះ',
+    'monthShort': [
+      'មករា',
+      'កុម្ភះ',
+      'មិនា',
+      'មេសា',
+      'ឧសភា',
+      'មិថុនា',
+      'កក្កដា',
+      'សីហា',
+      'កញ្ញា',
+      'តុលា',
+      'វិច្ឆិកា',
+      'ធ្នូ'
+    ],
+    'monthLong': [
+      'មករា',
+      'កុម្ភះ',
+      'មិនា',
+      'មេសា',
+      'ឧសភា',
+      'មិថុនា',
+      'កក្កដា',
+      'សីហា',
+      'កញ្ញា',
+      'តុលា',
+      'វិច្ឆិកា',
+      'ធ្នូ'
+    ],
+    'day': ['ច័ន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍', 'អាទិត្យ'],
+    'am': 'ព្រឹក',
+    'pm': 'ថ្ងៃ'
+  },
   'en': {
     'cancel': 'Cancel',
     'done': 'Done',
@@ -139,7 +176,15 @@ final _i18nModel = {
       'آبان',
       'آذر',
     ],
-    'day': ['دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنج شنبه', 'جمعه', 'شنبه', 'یکشنبه'],
+    'day': [
+      'دوشنبه',
+      'سه شنبه',
+      'چهارشنبه',
+      'پنج شنبه',
+      'جمعه',
+      'شنبه',
+      'یکشنبه'
+    ],
     'am': 'صبح',
     'pm': 'عصر'
   },
@@ -148,8 +193,34 @@ final _i18nModel = {
     'cancel': '取消',
     'done': '确定',
     'today': '今天',
-    'monthShort': ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
-    'monthLong': ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
+    'monthShort': [
+      '一月',
+      '二月',
+      '三月',
+      '四月',
+      '五月',
+      '六月',
+      '七月',
+      '八月',
+      '九月',
+      '十月',
+      '十一月',
+      '十二月'
+    ],
+    'monthLong': [
+      '一月',
+      '二月',
+      '三月',
+      '四月',
+      '五月',
+      '六月',
+      '七月',
+      '八月',
+      '九月',
+      '十月',
+      '十一月',
+      '十二月'
+    ],
     'day': ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
     'am': '上午',
     'pm': '下午'
@@ -466,8 +537,34 @@ final _i18nModel = {
     'cancel': '취소',
     'done': '완료',
     'today': '오늘',
-    'monthShort': ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
-    'monthLong': ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
+    'monthShort': [
+      '1월',
+      '2월',
+      '3월',
+      '4월',
+      '5월',
+      '6월',
+      '7월',
+      '8월',
+      '9월',
+      '10월',
+      '11월',
+      '12월'
+    ],
+    'monthLong': [
+      '1월',
+      '2월',
+      '3월',
+      '4월',
+      '5월',
+      '6월',
+      '7월',
+      '8월',
+      '9월',
+      '10월',
+      '11월',
+      '12월'
+    ],
     'day': ['월', '화', '수', '목', '금', '토', '일'],
     'am': '오전',
     'pm': '오후'
@@ -540,7 +637,15 @@ final _i18nModel = {
       'نوفمبر',
       'ديسمبر'
     ],
-    'day': ['الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعه', 'السبت', 'الاحد'],
+    'day': [
+      'الإثنين',
+      'الثلاثاء',
+      'الأربعاء',
+      'الخميس',
+      'الجمعه',
+      'السبت',
+      'الاحد'
+    ],
     'am': 'ص',
     'pm': 'م'
   },
@@ -621,8 +726,34 @@ final _i18nModel = {
     'cancel': 'キャンセル',
     'done': '完了',
     'today': '今日',
-    'monthShort': ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
-    'monthLong': ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
+    'monthShort': [
+      '1月',
+      '2月',
+      '3月',
+      '4月',
+      '5月',
+      '6月',
+      '7月',
+      '8月',
+      '9月',
+      '10月',
+      '11月',
+      '12月'
+    ],
+    'monthLong': [
+      '1月',
+      '2月',
+      '3月',
+      '4月',
+      '5月',
+      '6月',
+      '7月',
+      '8月',
+      '9月',
+      '10月',
+      '11月',
+      '12月'
+    ],
     'day': ['月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日', '日曜日'],
     'am': '午前',
     'pm': '午後'
@@ -1213,6 +1344,8 @@ Map<String, dynamic> i18nObjInLocale(LocaleType type) {
       return _i18nModel['sq'];
     case LocaleType.sv:
       return _i18nModel['sv'];
+    case LocaleType.kh:
+      return _i18nModel['kh'];
     case LocaleType.tw:
       return _i18nModel['tw'];
     default: