@sanity/locale-nl-nl 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/package.json +2 -2
- package/src/index.ts +8 -5
package/README.md
CHANGED
|
@@ -30,6 +30,24 @@ export default defineConfig({
|
|
|
30
30
|
|
|
31
31
|
The language should now show up in the Studio's user menu.
|
|
32
32
|
|
|
33
|
+
If you want to customize the title of the locale, pass it as an option to the plugin:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
// sanity.config.ts / sanity.config.js:
|
|
37
|
+
import {defineConfig} from 'sanity'
|
|
38
|
+
import {nlNLLocale} from '@sanity/locale-nl-nl'
|
|
39
|
+
|
|
40
|
+
export default defineConfig({
|
|
41
|
+
// ...
|
|
42
|
+
plugins: [
|
|
43
|
+
// ... other plugins here ...
|
|
44
|
+
nlNLLocale({
|
|
45
|
+
title: 'Dutch',
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
})
|
|
49
|
+
```
|
|
50
|
+
|
|
33
51
|
## Maintainers
|
|
34
52
|
|
|
35
53
|
We are looking for maintainers for this plugin!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/locale-nl-nl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Dutch / Nederlands locale/translation for Sanity Studio",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"src"
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"sanity": "^3.21.
|
|
44
|
+
"sanity": "^3.21.3"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {defineLocale, definePlugin} from 'sanity'
|
|
1
|
+
import {defineLocale, definePlugin, type LocaleDefinition} from 'sanity'
|
|
2
2
|
|
|
3
3
|
const locale = defineLocale({
|
|
4
4
|
id: 'nl-NL',
|
|
@@ -32,13 +32,16 @@ const locale = defineLocale({
|
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Nederlands locale/translation plugin for Sanity Studio
|
|
35
|
+
* Nederlands / Dutch locale/translation plugin for Sanity Studio
|
|
36
36
|
*
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
|
-
export const nlNLLocale = definePlugin
|
|
39
|
+
export const nlNLLocale = definePlugin<{
|
|
40
|
+
title?: string
|
|
41
|
+
weekInfo?: LocaleDefinition['weekInfo']
|
|
42
|
+
} | void>((config) => ({
|
|
40
43
|
name: '@sanity/locale-nl-nl',
|
|
41
44
|
i18n: {
|
|
42
|
-
locales: [locale],
|
|
45
|
+
locales: [config ? {...locale, ...config} : locale],
|
|
43
46
|
},
|
|
44
|
-
})
|
|
47
|
+
}))
|