From 08dd489a5852b0e7292ca0495f0b0088725544cb Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 12 Oct 2020 15:33:48 +0700 Subject: [PATCH] Add Vietnamese locale (#23) * Add Vietnamese vi locale * Add Vietnamese vi locale * Add Vietnamese vi locale Co-authored-by: Kris Luu --- lib/simple_moment.dart | 1 + lib/src/locales/vi.dart | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 lib/src/locales/vi.dart diff --git a/lib/simple_moment.dart b/lib/simple_moment.dart index a09213c..12d8ede 100644 --- a/lib/simple_moment.dart +++ b/lib/simple_moment.dart @@ -16,4 +16,5 @@ export 'src/locales/pt_br.dart'; export 'src/locales/th.dart'; export 'src/locales/tr.dart'; export 'src/locales/nl.dart'; +export 'src/locales/vi.dart'; export 'src/simple_moment_base.dart'; diff --git a/lib/src/locales/vi.dart b/lib/src/locales/vi.dart new file mode 100644 index 0000000..2e9d276 --- /dev/null +++ b/lib/src/locales/vi.dart @@ -0,0 +1,35 @@ +// Copyright (c) 2016, rinukkusu. All rights reserved. Use of this source code +// is governed by a BSD-style license that can be found in the LICENSE file. + +import '../localedata.dart'; +import '../identifier_position.dart'; + +class LocaleVi implements ILocaleData { + final String _localeString; + String get localeString => _localeString; + + LocaleVi([this._localeString = "vi"]); + + String get seconds => 'vài giây'; + + String get aMinute => 'một phút'; + String get minutes => '%i phút'; + + String get anHour => 'một giờ'; + String get hours => '%i giờ'; + + String get aDay => 'một ngày'; + String get days => '%i ngày'; + + String get aMonth => 'một tháng'; + String get months => '%i tháng'; + + String get aYear => 'một năm'; + String get years => '%i năm'; + + String get futureIdentifier => 'tới'; + String get pastIdentifier => 'trước'; + + IdentifierPosition get futurePosition => IdentifierPosition.append; + IdentifierPosition get pastPosition => IdentifierPosition.append; +}