/**
  * Set the name of the language
  *
  * Optionally, set the name in other languages.
  *
  * The $name parameter accepts 3 types of arguments:
  * - object (TranslationStringInterface): The data will be copied from the object's.
  * - array: All languages available in the array. The format of the array should
  *   be a hash in the `lang` => `string` format.
  * - string: The value will be assigned to the current language.
  *
  * @param TranslationString|array|string $name Language's name in one or more languages.
  * @return self
  */
 public function setName($name)
 {
     if ($name instanceof TranslationStringInterface) {
         $config = $name->languages();
     } elseif (is_array($name)) {
         $config = ['languages' => array_keys($name), 'default_language' => $this->ident()];
     } else {
         $config = null;
     }
     $this->name = new TranslationString($name, $config);
     return $this;
 }