From c1c3f84ce9d54a76e70c64a70a14f5137a055372 Mon Sep 17 00:00:00 2001 From: Jessehj Date: Mon, 8 Mar 2021 21:03:10 +0900 Subject: [PATCH] add: add korean language support --- src/types.ts | 2 +- src/utils/date.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index b7fd4ba..81c2e4f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,7 +3,7 @@ import { ComponentType } from 'react'; import { ViewStyle, TextStyle } from 'react-native'; -export type LocaleType = 'es' | 'en' | 'fr' | 'br' | 'zh'; +export type LocaleType = 'es' | 'en' | 'fr' | 'br' | 'zh' | 'ko'; interface DayTheme { activeDayColor?: string; diff --git a/src/utils/date.ts b/src/utils/date.ts index 3f2988e..2a340fc 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -115,6 +115,21 @@ export function getMonthNames(locale: LocaleType) { 'Novembro', 'Dezembro', ]; + case 'ko': + return [ + '1월', + '2월', + '3월', + '4월', + '5월', + '6월', + '7월', + '8월', + '9월', + '10월', + '11월', + '12월' + ]; default: return [ 'January', @@ -145,6 +160,8 @@ function getWeekdayNames(locale: LocaleType) { return ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab']; case 'zh': return ['日', '一', '二', '三', '四', '五', '六']; + case 'ko': + return ['일', '월', '화', '수', '목', '금', '토']; default: return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; }