public static String getStringWithFallback(@StringRes final int resId, final String fallback, final Object... params) {
        if ((APPLICATION_CONTEXT == null || resId == 0) && fallback == null) {
            return "(NoCtx/NoResId/NoFallback)[" + StringUtils.join(params, ";") + "]";
        }
        try {
            if (resId == 0 || APPLICATION_CONTEXT == null) {
                return params != null && params.length > 0 ? String.format(fallback, params) : fallback;
            }
            return params != null && params.length > 0 ? APPLICATION_CONTEXT.getString(resId, params) : APPLICATION_CONTEXT.getString(resId);
        } catch (IllegalFormatException | Resources.NotFoundException e) {
            String resStringWoFormat = null;
            try {
                resStringWoFormat = APPLICATION_CONTEXT == null ? null : APPLICATION_CONTEXT.getString(resId);
            } catch (Exception ex) {
                //ignore, this is for logging only!
            }

            Log.w("Problem trying to format '" + resId + "/'" + resStringWoFormat + "'/" + fallback + "' with [" + StringUtils.join(params, ";") + "] (appContext valid: " + (APPLICATION_CONTEXT != null) + ")", e);
            return (fallback == null ? "" : fallback) + ":" + StringUtils.join(params, ";");
        }
    }
A set of static helper methods supporting localization/internationalization
especially in areas where Code has no activity available to get a context from.
<br>
All methods work also in unit-test environments (where there is no available context
main/src/main/java/cgeo/geocaching/utils/LocalizationUtils.java