Skip to content

Commit

Permalink
fix: translate errors
Browse files Browse the repository at this point in the history
  • Loading branch information
horstenwillem committed Jan 13, 2022
1 parent 132ae24 commit 0cf7df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/parser.ts
Expand Up @@ -76,7 +76,7 @@ export function parseErrors(error: any = {}, translatorOptions?: TranslatorOptio
if (translatorOptions) {
const translator = getTranslator(translatorOptions.path, translatorOptions.defaultLocale);
try {
translatedMessage = translator.translate(error.i18n);
translatedMessage = translator.translate(error.i18n, translatorOptions?.language);
} catch (_error) {
// If language file was not found set text to default message
translatedMessage = error.message;
Expand Down

0 comments on commit 0cf7df5

Please sign in to comment.