Skip to content

Commit

Permalink
ES-261 (#1107)
Browse files Browse the repository at this point in the history
Co-authored-by: ase-101 <>
  • Loading branch information
ase-101 authored Oct 6, 2023
1 parent 1f50301 commit 8773f50
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 8773f50

Please sign in to comment.