Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/europeana/api-commons
Browse files Browse the repository at this point in the history
  • Loading branch information
SrishtiSingh-eu committed Jan 23, 2023
2 parents 329fba8 + 8e5d228 commit bbfc80b
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package eu.europeana.api.commons.definitions.utils;

import java.util.Locale;
import java.util.Set;

public class LanguageUtils {

private static Set<String> ISO_LANGUAGES;

public static boolean isIsoLanguage(String lang) {
if(ISO_LANGUAGES==null) {
ISO_LANGUAGES = Set.of(Locale.getISOLanguages());
}
return ISO_LANGUAGES.contains(lang);
}
}

0 comments on commit bbfc80b

Please sign in to comment.