``GET /{serviceInstanceId}/v2/bundles/{bundleId}/{languageId}``

        Gets the resource strings (key/value pairs) for the language. If
        ``fallback`` is ``True``, source language value is used if translated
        value is not available.
183511
def __get_language_data(self, bundleId, languageId, fallback=False):
        
        url = self.__get_base_bundle_url() + '/' + bundleId + '/' + languageId
        params = {'fallback': 'true'} if fallback else None
        response = self.__perform_rest_call(requestURL=url, params=params)

        if not response:
            return None

        languageData = response.get(self.__RESPONSE_RESOURCE_STRINGS_KEY)

        return languageData
276789
function i18n() {
				const i18nElement = findChild(libraryAppData, "i18n");
				if ( i18nElement ) {
					const i18n = i18nElement._;
					if ( i18n === "false" ) {
						return false;
					} else if ( i18n === "true" ) {
						return "messagebundle.properties";
					} else {
						return i18n;
					}
					// log.verbose("  sap.ui5/library/i18n property taken from .library appData: '%s'", library.i18n);
				} else {
					if ( libBundle.findResource("messagebundle.properties") != null ) {
						// log.verbose("  sap.ui5/library/i18n property determined from resources: '%s'", library.i18n);
						return "messagebundle.properties";
					} else {
						return false;
					}
				}
			}
407806
def get_fallback_languages():
    """"""
    lang = translation.get_language()
    fallback_list = settings.FALLBACK_LANGUAGES.get(lang, None)
    if fallback_list:
        return fallback_list

    return settings.FALLBACK_LANGUAGES.get(lang[:2], [])
984645
def get_fallback_language(self, language_code=None, site_id=None):
        
        choices = self.get_active_choices(language_code, site_id=site_id)
        if choices and len(choices) > 1:
            # Still take the last, like previous code.
            # With multiple fallback languages that means taking the base language.
            # Hence, upgrade the code to use get_fallback_languages() instead.
            return choices[-1]
        else:
            return None
681919
public static final Object getObject(Locale locale, String key)
   {
      ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale);
      return (bundle.getObject(key));
   }
1134447
@Override
	protected List<String> findAvailableLocales(String resource) {

		Set<String> result = new HashSet<String>();
		
		String[] msgBundleArray = resource
				.split(RESOURCE_BUNDLE_SEPARATOR);
		for (String msgResource : msgBundleArray) {
			List<String> availableLocales = GrailsLocaleUtils
					.getAvailableLocaleSuffixesForBundle(msgResource,
							rsHandler);
			result.addAll(availableLocales);
		}
		
		LOGGER.debug("Available locales for "+resource+" : "+result);
		return new ArrayList<String>(result);
	}
724583
public static String getResourceString(String key) {
        ResourceBundle bundle = FindbugsPlugin.getDefault().getResourceBundle();
        try {
            return bundle.getString(key);
        } catch (MissingResourceException e) {
            return key;
        }
    }
688078
def translate(self) -> Optional[str]:
        """"""

        fallbacks = getattr(settings, 'LOCALIZED_FIELDS_FALLBACKS', {})

        language = translation.get_language() or settings.LANGUAGE_CODE
        languages = fallbacks.get(language, [settings.LANGUAGE_CODE])[:]
        languages.insert(0, language)

        for lang_code in languages:
            value = self.get(lang_code)
            if value:
                return value or None

        return None
514607
function getProviderIDsForLanguage(languageId) {
        if (!_providers[languageId]) {
            return [];
        }
        return _providers[languageId].map(function (provider) {
            return provider.name;
        });
    }
1348032
@Override
    public SupportedLanguagesResponse getSupportedLanguages(String endpoint) throws HttpRosetteAPIException  {
        if (DOC_ENDPOINTS.contains(endpoint) || NAME_DEDUPLICATION_SERVICE_PATH.equals(endpoint)) {
            return sendGetRequest(urlBase + endpoint + SUPPORTED_LANGUAGES_SUBPATH, SupportedLanguagesResponse.class);
        } else {
            return null;
        }
    }
87360
def _get_cached_values(instance, translated_model, language_code, use_fallback=False):
    
    if not appsettings.PARLER_ENABLE_CACHING or not instance.pk or instance._state.adding:
        return None

    key = get_translation_cache_key(translated_model, instance.pk, language_code)
    values = cache.get(key)
    if not values:
        return None

    # Check for a stored fallback marker
    if values.get('__FALLBACK__', False):
        # Internal trick, already set the fallback marker, so no query will be performed.
        instance._translations_cache[translated_model][language_code] = MISSING

        # Allow to return the fallback language instead.
        if use_fallback:
            lang_dict = get_language_settings(language_code)
            # iterate over list of fallback languages, which should be already
            # in proper order
            for fallback_lang in lang_dict['fallbacks']:
                if fallback_lang != language_code:
                    return _get_cached_values(
                        instance, translated_model, fallback_lang,
                        use_fallback=False
                    )
        return None

    values['master'] = instance
    values['language_code'] = language_code
    return values
631568
def __get_return_value(self, messageKey, value):
        
        # if value is not None, return it
        # otherwise, either use the Translations fallback if there is one,
        # or return the message key back
        if value:
            return value
        else:
            if self._fallback:
                return self._fallback.gettext(messageKey)
            else:
                return messageKey
1098982
public static ResourceBundle getCurrentResourceBundle(String locale) {
		try {
			if (null != locale && !locale.isEmpty()) {
				return getCurrentResourceBundle(LocaleUtils.toLocale(locale));
			}
		} catch (IllegalArgumentException ex) {
			// do nothing
		}
		return getCurrentResourceBundle((Locale) null);
	}
1162212
private String localize(String key, String defaultValue) {
    String result = defaultValue;
    if (bundle != null) {
      try {
        result = bundle.getString(key);
      }
      catch (MissingResourceException mre) {
      }
    }
    return result;
  }
59635
def localized_resources(type = :resources, *resources, &block)
      localizable_route = nil

      if @locales
        res = resources.clone

        options = res.extract_options!
        r = res.first

        resource = resource_from_params(type, r, options.dup)

        # Check for translated resource
        stored_locale = I18n.locale
        @locales.each do |locale|
          I18n.locale = locale
          localized_path = I18nRouting.translation_for(resource.name, type)

          # A translated route exists :
          if !localized_path.blank? and String === localized_path
            puts("[I18n] > localize %-10s: %40s (%s) => /%s" % [type, resource.name, locale, localized_path]) if @i18n_verbose
            opts = options.dup
            opts[:path] = localized_path
            opts[:controller] ||= r.to_s.pluralize

            resource = resource_from_params(type, r, opts.dup)

            res = ["#{I18nRouting.locale_escaped(locale)}_#{r}".to_sym, opts]

            constraints = opts[:constraints] ? opts[:constraints].dup : {}
            constraints[:i18n_locale] = locale.to_s

            scope(:constraints => constraints, :path_names => I18nRouting.path_names(resource.name, @scope)) do
              localized_branch(locale) do
                send(type, *res) do

                  # In the resource(s) block, we need to keep and restore some context :
                  if block
                    old_name = @scope[:i18n_real_resource_name]
                    old = @scope[:scope_level_resource]

                    @scope[:i18n_real_resource_name] = resource.name
                    @scope[:i18n_scope_level_resource] = old
                    @scope[:scope_level_resource] = resource

                    if type == :resource and @scope[:name_prefix]
                      # Need to fake name_prefix for singleton resource
                      @scope[:name_prefix] = @scope[:name_prefix].gsub(Regexp.new("#{old.name}$"), resource.name)
                    end

                    block.call if block

                    @scope[:scope_level_resource] = old
                    @scope[:i18n_real_resource_name] = old_name
                  end

                  @scope[:i18n_scope_level_resource] = nil

                end
              end
            end

            localizable_route = resource
          end
        end
        I18n.locale = stored_locale
      end
      return localizable_route
    end
26374
public String getLocalized(String key) {
		if (bundle != null) {
			try {
				return bundle.getString(key);
	//			String localized = bundle.getString(key);
	//			if((localized != null) && (localized.length() > 0)) {
	//				return localized;
	//			}
			} catch (Exception e) {
			}

		}
		return key;
	}
579513
private ResourceBundle loadBundle() {
        String pkg = clazz.getPackage().getName();
        Locale locale = getLocale();
        return PropertyResourceBundle.getBundle(pkg + ".messages", locale, clazz.getClassLoader(), new ResourceBundle.Control() { //$NON-NLS-1$
            @Override
            public List<String> getFormats(String baseName) {
                return FORMATS;
            }
        });
    }