code: public static String getMessage(String key, String bundle) {
          if (!messagesBundles.containsKey(bundle)) {
              if (Context.getLocale() == null) {
                  messagesBundles.put(bundle, ResourceBundle.getBundle("i18n/" + bundle, Locale.getDefault()));
              } else {
                  messagesBundles.put(bundle, ResourceBundle.getBundle("i18n/" + bundle, Context.getLocale()));
              }
  
          }
          return messagesBundles.get(bundle).getString(key);
      }
docs: Gets a message by key using the resources bundle given in parameters.
  
  @param key
  The key of the message to retrieve.
  @param bundle
  The resource bundle to use.
  @return
  The String content of the message.