Codota Logo
LanguageUtils.getIso3LanguageFromLocalizedString
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
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
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • Kernel (java.awt.image)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now