@1024pix/pix-ui 44.3.2 → 44.3.3
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { createIntl } from '@formatjs/intl';
|
|
2
2
|
import en from './en';
|
|
3
3
|
import fr from './fr';
|
|
4
|
+
import nl from './nl';
|
|
4
5
|
|
|
5
6
|
export function formatMessage(locale, message, values) {
|
|
6
|
-
|
|
7
|
+
const intl = locales[locale] || locales.en;
|
|
8
|
+
return intl.formatMessage({ id: message }, values);
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
const locales = {
|
|
@@ -15,6 +17,10 @@ const locales = {
|
|
|
15
17
|
locale: 'en',
|
|
16
18
|
messages: flattenObject(en),
|
|
17
19
|
}),
|
|
20
|
+
nl: createIntl({
|
|
21
|
+
locale: 'nl',
|
|
22
|
+
messages: flattenObject(nl),
|
|
23
|
+
}),
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
export function flattenObject(object) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
pagination: {
|
|
3
|
+
beforeResultsPerPage: 'Zie',
|
|
4
|
+
selectPageSizeLabel: 'Selecteer het aantal items per pagina',
|
|
5
|
+
pageResults: '{total, plural, =0 {0 items} =1 {1 item} other {{total, number} items}}',
|
|
6
|
+
pageInfo:
|
|
7
|
+
'{start, number}-{end, number} van {total, plural, =0 {0 items} =1 {1 item} other {{total, number} items}}',
|
|
8
|
+
previousPageLabel: 'Ga naar vorige pagina',
|
|
9
|
+
pageNumber: 'Pagina {current, number} / {total, number}',
|
|
10
|
+
nextPageLabel: 'Ga naar volgende pagina',
|
|
11
|
+
},
|
|
12
|
+
};
|