Returns the default language map.
@param appid appid name of the {@link com.erudika.para.core.App}
@return the default language map or an empty map if the default isn't set.
336955
public Map<String, String> getDefaultLanguage(String appid) {
		if (!LANG_CACHE.containsKey(getDefaultLanguageCode())) {
			logger.info("Default language map not set, loading English.");
			Map<String, String> deflang = readLanguageFromFile(appid, getDefaultLanguageCode());
			if (deflang != null && !deflang.isEmpty()) {
				LANG_CACHE.put(getDefaultLanguageCode(), deflang);
				return Collections.unmodifiableMap(deflang);
			}
		}
		return Collections.unmodifiableMap(LANG_CACHE.get(getDefaultLanguageCode()));
	}
957723
public List<String> getRoles(String appId) {
    if (roles.containsKey(appId)) {
      return Collections.unmodifiableList(roles.get(appId));
    } else {
      return null;
    }
  }
1180169
public void setDefaultLanguage(Map<String, String> deflang) {
		if (deflang != null && !deflang.isEmpty()) {
			LANG_CACHE.put(getDefaultLanguageCode(), deflang);
		}
	}
801006
public function setAppId($appId = null)
    {
        return $this->set($this->appIdColumn, $appId ?: wei()->app->getId());
    }
597156
public static Map<String, String> AppConsumeByMap(Map<String, String> reqData) {
		return SDKUtil.convertResultStringToMap(AppConsume(reqData));
	}
1135901
private String getAppPrefix( AppInfo appInfo )
    {
        /// @TODO scope is ignored in key
        return String.format( "%s.%s.", appInfo.getProviderName(), appInfo.getAppName() );
    }
597107
public Application getRegisteredApplications(String appName) {
        return appNameApplicationMap.get(appName.toUpperCase(Locale.ROOT));
    }
117658
public static function get(LanguageInterface $language = null, $application_name = null) {
		if (!isset(self::$translation[$language->name_short]) OR self::$translation[$language->name_short]->application_name != $application_name) {
			self::$translation[$language->name_short] = new self($language, $application_name);
		}

		return self::$translation[$language->name_short];
	}
1056763
public static boolean isRoot(String appid) {
		return StringUtils.equals(id(Config.getRootAppIdentifier()), id(appid));
	}
474959
@Override
  public final void setLang(final Languages pLang) {
    this.lang = pLang;
    if (this.itsId == null) {
      this.itsId = new IdI18nCurrency();
    }
    this.itsId.setLang(this.lang);
  }
159374
private void updateTranslationProgressMap(String appid, String langCode, int value) {
		if (dao == null || getDefaultLanguageCode().equals(langCode)) {
			return;
		}

		double defsize = getDefaultLanguage(appid).size();
		double approved = value;

		Map<String, Integer> progress = getTranslationProgressMap(appid);
		Integer percent = progress.get(langCode);
		if (value == PLUS) {
			approved = Math.round(percent * (defsize / 100) + 1);
		} else if (value == MINUS) {
			approved = Math.round(percent * (defsize / 100) - 1);
		}
		int allowedUntranslated = defsize > 10 ? 5 : 0;
		// allow 3 identical words per language (i.e. Email, etc)
		if (approved >= defsize - allowedUntranslated) {
			approved = defsize;
		}

		if (((int) defsize) == 0) {
			progress.put(langCode, 0);
		} else {
			progress.put(langCode, (int) ((approved / defsize) * 100));
		}
		Sysprop updatedProgress = new Sysprop(progressKey);
		for (Map.Entry<String, Integer> entry : progress.entrySet()) {
			updatedProgress.addProperty(entry.getKey(), entry.getValue());
		}
		langProgressCache = updatedProgress;
		if (percent < 100 && !percent.equals(progress.get(langCode))) {
			dao.create(appid, updatedProgress);
		}
	}
47453
public List<Episode> getAllEpisodes(String id, String language) throws TvDbException {
        List<Episode> episodeList = Collections.emptyList();

        if (isValidNumber(id)) {
            StringBuilder urlBuilder = new StringBuilder();
            urlBuilder.append(BASE_URL)
                      .append(apiKey)
                      .append(SERIES_URL)
                      .append(id)
                      .append(ALL_URL);
            if (StringUtils.isNotBlank(language)) {
                urlBuilder.append(language).append(XML_EXTENSION);
            }

            LOG.trace(URL, urlBuilder.toString());
            episodeList = TvdbParser.getAllEpisodes(urlBuilder.toString(), -1);
        }
        return episodeList;
    }
727588
public Locale getLocaleOrDefault(String language) {
        String lang = getLanguageOrDefault(language);
        return Locale.forLanguageTag(lang);
    }
945970
@Override
  public final void setLang(final Languages pLang) {
    this.lang = pLang;
    if (this.itsId == null) {
      this.itsId = new IdI18nSeGoods();
    }
    this.itsId.setLang(this.lang);
  }
736576
private function getCountriesForLanguage($languageID)
    {
        $cl = $this->app->make('lists/countries');
        $recommendedCountries = [];
        foreach ($cl->getCountriesForLanguage($languageID) as $countryID) {
            $recommendedCountries[$countryID] = $cl->getCountryName($countryID);
        }
        $otherCountries = [];
        foreach ($cl->getCountries() as $countryID => $countryName) {
            if (!isset($recommendedCountries[$countryID])) {
                $otherCountries[$countryID] = $countryName;
            }
        }
        if (count($recommendedCountries) === 0) {
            $result = $otherCountries;
        } elseif (count($otherCountries) === 0) {
            $result = $recommendedCountries;
        } else {
            $result = [
                t('** Recommended Countries') => $recommendedCountries,
                t('** Other Countries') => $otherCountries,
            ];
        }

        return $result;
    }
183488
@Deprecated
    public void setAppId(String appId) {
        checkUserSession("setAppId");
        synchronized (this.lock) {
            mAppId = appId;
            sessionInvalidated = true;
        }
    }
408313
@Override
  public final void setLang(final Languages pLang) {
    this.lang = pLang;
    if (this.itsId == null) {
      this.itsId = new IdI18nUnitOfMeasure();
    }
    this.itsId.setLang(this.lang);
  }