private Asset getLocalizedAssetFromResource(Resource unlocalized, Locale locale) {
    Resource localized = locale == null ? unlocalized : unlocalized.forLocale(locale);

    if (localized == null || !localized.exists())
      throw new RuntimeException(
          String.format("Unable to locate asset '%s' (the file does not exist).", unlocalized));

    return getAssetForResource(localized);
  }
  private Resource localize(Resource unlocalized, Locale locale) {
    Resource localized = unlocalized.forLocale(locale);

    return localized != null ? localized : unlocalized;
  }