code: func (t *UniversalTranslator) Import(format ImportExportFormat, dirnameOrFilename string) error {
  
  	fi, err := os.Stat(dirnameOrFilename)
  	if err != nil {
  		return err
  	}
  
  	processFn := func(filename string) error {
  
  		f, err := os.Open(filename)
  		if err != nil {
  			return err
  		}
  		defer f.Close()
  
  		return t.ImportByReader(format, f)
  	}
  
  	if !fi.IsDir() {
  		return processFn(dirnameOrFilename)
  	}
  
  	// recursively go through directory
  	walker := func(path string, info os.FileInfo, err error) error {
  
  		if info.IsDir() {
  			return nil
  		}
  
  		switch format {
  		case FormatJSON:
  			// skip non JSON files
  			if filepath.Ext(info.Name()) != ".json" {
  				return nil
  			}
  		}
  
  		return processFn(path)
  	}
  
  	return filepath.Walk(dirnameOrFilename, walker)
  }
docs: // Import reads the translations out of a file or directory on disk.
  //
  // NOTE: this currently only works with string or int translations keys.