Skip to content

Turkish Language Support #92

@oguzydz

Description

@oguzydz

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-month@1.7.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-month/src/types.ts b/node_modules/react-native-month/src/types.ts
index 88e7419..b7f48db 100644
--- a/node_modules/react-native-month/src/types.ts
+++ b/node_modules/react-native-month/src/types.ts
@@ -1,7 +1,7 @@
 import { ReactElement } from 'react';
 import { ViewStyle, TextStyle } from 'react-native';
 
-export type LocaleType = 'es' | 'en' | 'fr' | 'br' | 'zh' | 'ru' | 'uk';
+export type LocaleType = 'es' | 'en' | 'fr' | 'br' | 'zh' | 'ru' | 'uk' | 'tr';
 
 /**
  * Format: YYYY-MM-DD
diff --git a/node_modules/react-native-month/src/utils/date.ts b/node_modules/react-native-month/src/utils/date.ts
index f38fca5..724d467 100644
--- a/node_modules/react-native-month/src/utils/date.ts
+++ b/node_modules/react-native-month/src/utils/date.ts
@@ -149,6 +149,21 @@ export function getMonthNames(locale: LocaleType) {
         'Листопад',
         'Грудень',
       ];
+    case 'tr':
+      return [
+        'Ocak',
+        'Şubat',
+        'Mart',
+        'Nisan',
+        'Mayıs',
+        'Haziran',
+        'Temmuz',
+        'Ağustos',
+        'Eylül',
+        'Ekim',
+        'Kasım',
+        'Aralık',
+      ];
     default:
       return [
         'January',
@@ -183,6 +198,8 @@ export function getWeekdayNames(locale: LocaleType) {
       return ['ВСК', 'ПНД', 'ВТР', 'СРД', 'ЧТВ', 'ПТН', 'СБТ'];
     case 'uk':
       return ['НЕД', 'ПНД', 'ВВТ', 'СРД', 'ЧТВ', 'ПТН', 'СБТ'];
+    case 'tr':
+      return ['Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cuma', 'Cum'];
     default:
       return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
   }

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions