Skip to content

Added Swedish (sv) translation. #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docusaurus/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ npm install react-native-paper-dates --save

### Supported

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`.
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`.

```javascript
import { enGB, registerTranslation } from 'react-native-paper-dates'
Expand Down
2 changes: 2 additions & 0 deletions example/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
th,
ukUA,
noNO,
sv,
} from 'react-native-paper-dates'
import { useCallback, useMemo, useState } from 'react'
import React from 'react'
Expand Down Expand Up @@ -87,6 +88,7 @@ const locales: [string, TranslationsType][] = [
['th', th],
['uk-UA', ukUA],
['no-NO', noNO],
['sv', sv],
]

locales.forEach((locale) => {
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ export { default as ja } from './translations/ja'
export { default as th } from './translations/th'
export { default as ukUA } from './translations/ukUA'
export { default as noNO } from './translations/noNO'
export { default as sv } from './translations/sv'
23 changes: 23 additions & 0 deletions src/translations/sv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { TranslationsType } from './utils'

const sv: TranslationsType = {
save: 'Spara',
selectSingle: 'Välj datum',
selectMultiple: 'Välj datum',
selectRange: 'Välj period',
notAccordingToDateFormat: (inputFormat) =>
`Datum måste vara i formatet ${inputFormat}`,
mustBeHigherThan: (date) => `Måste vara efter ${date}`,
mustBeLowerThan: (date) => `Måste vara före ${date}`,
mustBeBetween: (startDate, endDate) =>
`Måste vara mellan ${startDate} - ${endDate}`,
dateIsDisabled: 'Datumet är inte tillåtet',
previous: 'Föregående',
next: 'Nästa',
typeInDate: 'Skriv datum',
pickDateFromCalendar: 'Välj datum i kalender',
close: 'Stäng',
minute: 'Minut',
hour: 'Timme',
}
export default sv