public static Translation getFromCache(TranslatedEntity entityType, String id, String propertyName, String localeCode) {
Map<String, Translation> threadlocalCache = getThreadlocalCache();
Translation translation = threadlocalCache.get(buildCacheKey(entityType, id, propertyName, localeCode));
if (translation == null && StringUtils.contains(localeCode, '_')) {
String languageWithoutCountryCode = localeCode.substring(localeCode.indexOf('_') + 1);
translation = threadlocalCache.get(buildCacheKey(entityType, id, propertyName, languageWithoutCountryCode));
}
return translation;
}