Edit a language.
@param string $name
@param string $slug
@param string $locale
@param string $alias
@param string $icon
@return void
173281
public function edit($name, $slug, $locale, $alias, $icon): void
    {
        $this->name   = $name;
        $this->slug   = $slug;
        $this->locale = $locale;
        $this->alias  = $alias;
        $this->icon   = $icon;
        $this->updated_by = Yii::$app->user->identity->id;
    }
1039885
protected function SetTransDescription($name)
    {
        $field = $this->GetElement($name);
        $field->SetDescription(Worder::Replace($this->FieldDescription($name)));
    }
801839
public function edit($id, LanguageForm $form): void
    {
        $model = $this->repository->get($id);
        $model->edit(
            $form->name,
            $form->slug,
            $form->locale,
            $form->alias,
            $form->icon
        );
        $this->assertIsUniqueSlug($model);
        $this->repository->save($model);
    }
86299
public function jsonCacheSave( $name, $language = '', $data )
	{
		$cache_folder = $this->app->config('cache.path')."json/";
		$cache_name   = md5( $name.$language ).".json";
		file_put_contents( $cache_folder.$cache_name, $this->jsonCacheCompress( json_encode($data) ) );
	}
1197671
function registerLanguage(name, syntax) {
  var lang = syntax(low)

  languages[name] = lang

  languageNames.push(name)

  if (lang.aliases) {
    registerAlias(name, lang.aliases)
  }
}
399642
public function addIconMetric(string $name, $icon){
        if(!array_key_exists($icon, self::ICON_NAMES)){
            throw new \InvalidArgumentException();
        }

        $this->addMetric(
            trim($name),
            self::TYPE_ICON,
            [
                "icon"  => $icon,
            ]
        );
    }
212034
private function setParamsTransObj(&$trans_obj, $locale, $alias, $title='')
    {
        $trans_obj
            ->setAlias($alias)
            ->setLocale($locale)
            ->setTitle($title)
            ->save();
    }
873636
public function processPreSet($entity, $name, &$value, $locale=null, $hook=true, $silentException=false) {
		if($hook)
			$this->trigger('set', [$entity, $name, &$value, $locale]);

		if($this->hasProperty($name)) {
			if($this->property($name)->get('hooks.set')) {
				$hook = $this->property($name)->get('hooks.set');
				$value = call_user_func_array($hook, [$value, $entity]);
			}

			if($this->property($name)->get('i18n')) {
				if($locale == 'all') {
					$val = [];
					foreach($value as $one => $v)
						$val[$one] = $this->property($name)->setDecorator($v, $entity, $name, $silentException);
					$value = $val;
				}
				else
					$value = $this->property($name)->setDecorator($value, $entity, $name, $silentException);
			}
			else
				$value = $this->property($name)->setDecorator($value, $entity, $name, $silentException);
		}
	}
677448
public function hookgetTranslations(\Asgard\Hook\Chain $chain, \Asgard\Entity\Entity $entity, $name, $locale) {
		return $this->getDataMapper()->getTranslations($entity, $locale);
	}
178283
public function setName(string $name): void
	{
		if ($name === '') {
			throw new InvalidArgumentException;
		}
		if (Strings::match($name, '/[^A-Za-z0-9_]/')) {
			throw new InvalidArgumentException('Name contains invalid characters');
		}

		/* @var $repository AclRolesRepository */
		$repository = $this->getRepository();
		$role = $repository->getByName($name);
		if ($role !== null && $role !== $this) {
			throw new UniqueConstraintViolationException("Role '$name' exists");
		}
		$this->name = $name;
	}
1012625
private function loadLanguageFile($name)
    {
        /** @var System $system */
        $system = $this->framework->getAdapter(System::class);
        $system->loadLanguageFile($name);
    }
988478
public function createMessageFile($name = "defaultTranslationService", $selfedit="false", $language) {
	
		$this->addTranslationLanguageFromService(($selfedit == "true"), $name, $language);
		
		header('location:'.$_SERVER['HTTP_REFERER']);
	}
361842
public function setLocale($locale) {
		$this->locale = $locale;
		
		if ($this->checkTranslateObjectIsSet()) {
			$this->translation->setLocale($this->locale);
		}
	}
780253
function i18n_change_locale($locale){
        if(isset($this->fileName)){
            i18n($this->fileName, $locale);
        }
        else{
            \Enola\Error::general_error('I18n Error', 'Before call i18n_change_locale is necesary call i18n');
        }
    }
714658
public function edit($slug)
    {
        $this->loadModel('Content.ContentTypes');
        $this->loadModel('User.Roles');

        $type = $this->ContentTypes
            ->find()
            ->where(['slug' => $slug])
            ->first();

        if (!$type) {
            throw new NotFoundException(__d('content', 'Content type was not found!'));
        }

        if ($this->request->data()) {
            $type->accessible(['id', 'slug'], false);
            $data = $this->request->data();
            $type = $this->ContentTypes->patchEntity($type, $data);

            if ($this->ContentTypes->save($type, ['associated' => ['Roles']])) {
                $this->Flash->success(__d('content', 'Content type updated!'));
                $this->redirect(['plugin' => 'Content', 'controller' => 'types', 'action' => 'edit', $type->slug]);
            } else {
                $this->Flash->danger(__d('content', 'Content type could not be updated, check your information.'));
            }
        } else {
            // fix for auto-fill "defaults.*" by FormHelper
            $this->request->data = $type->toArray();
        }

        $roles = $this->Roles->find('list');
        $this->title(__d('content', 'Configure Content Type'));
        $this->set(compact('type', 'roles'));
        $this->set('languages', LocaleToolbox::languagesList());
        $this->Breadcrumb
            ->push('/admin/content/manage')
            ->push(__d('content', 'Content Types'), '/admin/content/types')
            ->push(__d('content', 'Editing "{0}" Content Type', $type->name), '');
    }
16008
void setLanguage(final Locale locale) {

        if (!m_languageSelect.getValue().equals(locale)) {
            m_languageSelect.setValue(locale);
        }
    }
899670
public function setSourceLanguage(string $language): void
    {
        $this->xliff->setSourceLanguage($language);
        $this->markChanged();
    }