id: d6_language_types
label: Language types
migration_tags:
  - Drupal 6
  - Configuration
source:
  plugin: variable
  variables:
    - language_negotiation
  source_module: locale
process:
  all:
    plugin: default_value
    default_value:
      - 'language_interface'
      - 'language_content'
      - 'language_url'
  configurable:
    plugin: default_value
    default_value:
      - 'language_interface'
  negotiation/language_content/enabled:
    plugin: default_value
    default_value:
      'language-interface': 0
  negotiation/language_url/enabled:
    plugin: default_value
    default_value:
      'language-url': 0
      'language-url-fallback': 1
  negotiation/language_interface/enabled:
    plugin: static_map
    source: language_negotiation
    map:
      # LANGUAGE_NEGOTIATION_NONE = 0
      # LANGUAGE_NEGOTIATION_PATH_DEFAULT = 1
      # LANGUAGE_NEGOTIATION_PATH = 2
      # LANGUAGE_NEGOTIATION_DOMAIN = 3
      0:
        'language-selected': 0
      1:
        'language-url': 0
        'language-selected': 1
      2:
        'language-url': 0
        'language-user': 1
        'language-browser': 2
        'language-selected': 3
      3:
        'language-url': 0
        'language-selected': 1
destination:
  plugin: config
  config_name: language.types
migration_dependencies:
  required:
    - language
