Skip to content

Commit

Permalink
ES-261
Browse files Browse the repository at this point in the history
  • Loading branch information
ase-101 committed Oct 5, 2023
1 parent 1f50301 commit fd3ecf4
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,13 @@ private List<String> convertLangCodesToISO3LanguageCodes(String[] langCodes) {
if(langCodes == null || langCodes.length == 0)
return List.of("eng");
return Arrays.stream(langCodes)
.map(langCode -> new Locale(langCode).getISO3Language())
.map(langCode -> {
try {
return new Locale(langCode).getISO3Language();
} catch (MissingResourceException ex) {}
return null;
})
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
}

0 comments on commit fd3ecf4

Please sign in to comment.