Skip to content

Commit be55aa2

Browse files
authored
Merge pull request #462 from EClaesson/swedish-translation
Added Swedish (sv) translation.
2 parents 1353877 + 93c7d92 commit be55aa2

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

docusaurus/docs/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm install react-native-paper-dates --save
3636

3737
### Supported
3838

39-
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja/th/uk-UA/no-NO` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
39+
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja/th/uk-UA/no-NO/sv` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
4040

4141
```javascript
4242
import { enGB, registerTranslation } from 'react-native-paper-dates'

example/app/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import {
5454
th,
5555
ukUA,
5656
noNO,
57+
sv,
5758
} from 'react-native-paper-dates'
5859
import { useCallback, useMemo, useState } from 'react'
5960
import React from 'react'
@@ -87,6 +88,7 @@ const locales: [string, TranslationsType][] = [
8788
['th', th],
8889
['uk-UA', ukUA],
8990
['no-NO', noNO],
91+
['sv', sv],
9092
]
9193

9294
locales.forEach((locale) => {

src/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ export { default as ja } from './translations/ja'
3434
export { default as th } from './translations/th'
3535
export { default as ukUA } from './translations/ukUA'
3636
export { default as noNO } from './translations/noNO'
37+
export { default as sv } from './translations/sv'

src/translations/sv.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const sv: TranslationsType = {
4+
save: 'Spara',
5+
selectSingle: 'Välj datum',
6+
selectMultiple: 'Välj datum',
7+
selectRange: 'Välj period',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Datum måste vara i formatet ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Måste vara efter ${date}`,
11+
mustBeLowerThan: (date) => `Måste vara före ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Måste vara mellan ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Datumet är inte tillåtet',
15+
previous: 'Föregående',
16+
next: 'Nästa',
17+
typeInDate: 'Skriv datum',
18+
pickDateFromCalendar: 'Välj datum i kalender',
19+
close: 'Stäng',
20+
minute: 'Minut',
21+
hour: 'Timme',
22+
}
23+
export default sv

0 commit comments

Comments
 (0)