vue-i18n-extract
vue-i18n-extract copied to clipboard
JS Locale File Support
We're using .js
files for our locale files so we can include date formatting functions in our locales e.g:
function formatDate(i18nContext, month) {
return `${i18nContext.named('day') ? i18nContext.named('day') + '. ' : ''}${month}${i18nContext.named('year') ? ' ' + i18nContext.named('year') : ''}`;
}
export default {
'January': (ctx) => formatDate(ctx, 'Januar'),
'February': (ctx) => formatDate(ctx, 'Februar'),
'March': (ctx) => formatDate(ctx, 'März'),
'April': (ctx) => formatDate(ctx, 'April'),
'May': (ctx) => formatDate(ctx, 'Mai'),
'June': (ctx) => formatDate(ctx, 'Juni'),
'July': (ctx) => formatDate(ctx, 'Juli'),
'August': (ctx) => formatDate(ctx, 'August'),
'September': (ctx) => formatDate(ctx, 'September'),
'October': (ctx) => formatDate(ctx, 'Oktober'),
'November': (ctx) => formatDate(ctx, 'November'),
'December': (ctx) => formatDate(ctx, 'Dezember'),
'Clear': 'Löschen'
};
I was wondering if there were plans to support the use of js locale files for reporting?