language
Adds, renames, ensures or removes a language of content.
A step of a YAML migration with type: language. The class expMigrationStepLanguage (kernel/classes/migration/steps/expmigrationsteplanguage.php) is registered in settings/migration.ini [StepSettings] StepTypeList[language].
Modes
mode: is one of create, update, ensure, delete; every step names one.
Keys
| Key | Type | Modes | Default | What it is |
|---|---|---|---|---|
locale | string | create, ensure | the locale of the language (ger-DE); ensure finds the language by it | |
language | identifier (language) | update, delete | the language to rename or remove: its locale or id | |
name | string | create, update, ensure | the name of the language (default: the name of the locale) | |
missing | string: fail, skip | update, delete | "fail" | what happens when the language is not there: fail (the default) or skip |
Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).
Values for references
references: { <name>: <value> } keeps a value of the step's result as ${ref.<name>} for the steps and migrations after it:
| Value | What it is |
|---|---|
language_id | the id of the language |
locale | its locale |
name | its name |
created | true when the step added the language |
changed | true when the step changed it (added, renamed or removed) |
Undoing
Some steps of this type undo themselves when their migration is rolled back without down: (the class says which); a migration with any other step of it needs down: or a rollback to its caption.
Caches it touches (cleared after the run): content_language, content.
Example
- type: language
mode: ensure
locale: ger-DE
name: DeutschRelated
Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationsteplanguage.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.