code: func (t *UniversalTranslator) ImportByReader(format ImportExportFormat, reader io.Reader) error {
  
  	b, err := ioutil.ReadAll(reader)
  	if err != nil {
  		return err
  	}
  
  	var trans []translation
  
  	switch format {
  	case FormatJSON:
  		err = json.Unmarshal(b, &trans)
  	}
  
  	if err != nil {
  		return err
  	}
  
  	for _, tl := range trans {
  
  		locale, found := t.FindTranslator(tl.Locale)
  		if !found {
  			return &ErrMissingLocale{locale: tl.Locale}
  		}
  
  		pr := stringToPR(tl.PluralRule)
  
  		if pr == locales.PluralRuleUnknown {
  
  			err = locale.Add(tl.Key, tl.Translation, tl.OverrideExisting)
  			if err != nil {
  				return err
  			}
  
  			continue
  		}
  
  		switch tl.PluralType {
  		case cardinalType:
  			err = locale.AddCardinal(tl.Key, tl.Translation, pr, tl.OverrideExisting)
  		case ordinalType:
  			err = locale.AddOrdinal(tl.Key, tl.Translation, pr, tl.OverrideExisting)
  		case rangeType:
  			err = locale.AddRange(tl.Key, tl.Translation, pr, tl.OverrideExisting)
  		default:
  			return &ErrBadPluralDefinition{tl: tl}
  		}
  
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // ImportByReader imports the the translations found within the contents read from the supplied reader.
  //
  // NOTE: generally used when assets have been embedded into the binary and are already in memory.