Skip to content

Commit

Permalink
feat: add nl locale
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin authored Mar 19, 2024
1 parent 88cddc9 commit 3867a93
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/translations/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createIntl } from '@formatjs/intl';
import en from './en';
import fr from './fr';
import nl from './nl';

export function formatMessage(locale, message, values) {
const intl = locales[locale] || locales.en;
Expand All @@ -16,6 +17,10 @@ const locales = {
locale: 'en',
messages: flattenObject(en),
}),
nl: createIntl({
locale: 'nl',
messages: flattenObject(nl),
}),
};

export function flattenObject(object) {
Expand Down
12 changes: 12 additions & 0 deletions addon/translations/nl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
pagination: {
beforeResultsPerPage: 'Zie',
selectPageSizeLabel: 'Selecteer het aantal items per pagina',
pageResults: '{total, plural, =0 {0 items} =1 {1 item} other {{total, number} items}}',
pageInfo:
'{start, number}-{end, number} van {total, plural, =0 {0 items} =1 {1 item} other {{total, number} items}}',
previousPageLabel: 'Ga naar vorige pagina',
pageNumber: 'Pagina {current, number} / {total, number}',
nextPageLabel: 'Ga naar volgende pagina',
},
};

0 comments on commit 3867a93

Please sign in to comment.