Tabnine Logo
LanguageUtils.getIso3LanguageFromLocalizedString
Code IndexAdd Tabnine to your IDE (free)

How to use
getIso3LanguageFromLocalizedString
method
in
org.tinymediamanager.scraper.util.LanguageUtils

Best Java code snippets using org.tinymediamanager.scraper.util.LanguageUtils.getIso3LanguageFromLocalizedString (Showing top 3 results out of 315)

origin: tinyMediaManager/tinyMediaManager

private String parseLanguageFromString(String shortname) {
 if (StringUtils.isBlank(shortname)) {
  return "";
 }
 Set<String> langArray = LanguageUtils.KEY_TO_LOCALE_MAP.keySet();
 shortname = shortname.replaceAll("(?i)Part [Ii]+", ""); // hardcoded; remove Part II which is no stacking marker; b/c II is a valid iso code :p
 shortname = StringUtils.split(shortname, '/')[0].trim(); // possibly "de / de" - just take first
 for (String s : langArray) {
  try {
   if (shortname.equalsIgnoreCase(s) || shortname.matches("(?i).*[ _.-]+" + Pattern.quote(s) + "$")) {// ends with lang + delimiter prefix
    LOGGER.debug("found language '" + s + "' in '" + this.getFilename());
    return LanguageUtils.getIso3LanguageFromLocalizedString(s);
   }
  }
  catch (Exception e) {
   LOGGER.warn("Error parsing subtitle language from locale keyset: " + s, e);
  }
 }
 return "";
}
origin: tinyMediaManager/tinyMediaManager

sub.setLanguage(LanguageUtils.getIso3LanguageFromLocalizedString(lang));
break;
origin: tinyMediaManager/tinyMediaManager

return LanguageUtils.getIso3LanguageFromLocalizedString(language);
org.tinymediamanager.scraper.utilLanguageUtilsgetIso3LanguageFromLocalizedString

Javadoc

uses our localized language mapping table, to get the iso3 code

Popular methods of LanguageUtils

  • getLocalizedCountryForLanguage
    tries to get localized COUNTRY name (in given language) for given parameters/variants
  • getLocalizedLanguageNameFromLocalizedString
    uses our localized language mapping table, to get the localized language name in given language
  • getISO3BLanguage
    Get the ISO 639-2/B 3 letter code
  • getEnglishLanguageNameFromLocalizedString
    uses our localized language mapping table, to get the english language name
  • getIso2LanguageFromLocalizedString
    uses our localized language mapping table, to get the iso2 code
  • getIso3BLanguageFromLocalizedString
    uses our localized language mapping table, to get the iso3B code

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Option (scala)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now