diff --git a/addon/translations/index.js b/addon/translations/index.js index 347f8d2e0..0337c9eb7 100644 --- a/addon/translations/index.js +++ b/addon/translations/index.js @@ -1,9 +1,11 @@ import { createIntl } from '@formatjs/intl'; import en from './en'; import fr from './fr'; +import nl from './nl'; export function formatMessage(locale, message, values) { - return locales[locale].formatMessage({ id: message }, values); + const intl = locales[locale] || locales.en; + return intl.formatMessage({ id: message }, values); } const locales = { @@ -15,6 +17,10 @@ const locales = { locale: 'en', messages: flattenObject(en), }), + nl: createIntl({ + locale: 'nl', + messages: flattenObject(nl), + }), }; export function flattenObject(object) { diff --git a/addon/translations/nl.js b/addon/translations/nl.js new file mode 100644 index 000000000..ec1f339cd --- /dev/null +++ b/addon/translations/nl.js @@ -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', + }, +};