code: def localization_js(current_localization_name: str) -> str:
      fns = localizations.get(current_localization_name, None)
      data = {}
      if fns is not None:
          for fn in fns:
              try:
                  with open(fn, "r", encoding="utf8") as file:
                      data.update(json.load(file))
              except Exception:
                  errors.report(
                      f"Error loading localization from {fn}",
                      exc_info=True,
                  )
  
      return f"window.localization = {json.dumps(data)}"
  
imports: import json
  import os
  from modules import errors, scripts
label_desc: Use image node_id 2 for calling a global function with example usage: localization_js(current_localization_name) and returns: str, json