code: public void addLanguageResources(ServletContext context) {
  
          // Get the paths of all the translation files
          Set<?> resourcePaths = context.getResourcePaths(TRANSLATION_PATH);
          
          // If no translation files found, nothing to add
          if (resourcePaths == null)
              return;
          
          // Iterate through all the found language files and add them to the map
          for (Object resourcePathObject : resourcePaths) {
  
              // Each resource path is guaranteed to be a string
              String resourcePath = (String) resourcePathObject;
  
              // Parse language key from path
              String languageKey = getLanguageKey(resourcePath);
              if (languageKey == null) {
                  logger.warn("Invalid language file name: \"{}\"", resourcePath);
                  continue;
              }
  
              // Add/overlay new resource
              addLanguageResource(
                  languageKey,
                  new WebApplicationResource(context, "application/json", resourcePath)
              );
  
          }
  
      }
docs: Adds or overlays all languages defined within the /translations
  directory of the given ServletContext. If no such language files exist,
  nothing is done. If a language is already defined, the strings from the
  will be overlaid on top of the existing strings, augmenting or
  overriding the available strings for that language. The language key
  for each language file is derived from the filename.
  
  @param context
  The ServletContext from which language files should be loaded.