state: language

This site is not setup as multilingual and all the initial articles have the Language assigned to All in the interface. But still we created three additional articles for this page:

  • English having Language assigned to "en-GB"
  • Dutch having language assigned to "nl-NL"
  • French having language assigned to "fr-FR"

List of articles when the Frontmatter has language: fr in the state:

  • French (language: fr)

Note: with language: (or without any mention of it), only the articles being assigned to all languages (*) are listed.


And here is a little var_dump(collection()) so that you can see all what is immediately available in the array itself:

object(ComPagesModelEntityItems)#1841 (1) {
  [5]=>
  array(25) {
    ["id"]=>
    string(1) "5"
    ["slug"]=>
    string(6) "french"
    ["title"]=>
    string(6) "French"
    ["summary"]=>
    string(0) ""
    ["category"]=>
    string(753) "object(ExtJoomlaModelEntityCategory)#2071 (16) {
  ["id"]=>
  string(1) "2"
  ["slug"]=>
  string(13) "uncategorised"
  ["title"]=>
  string(13) "Uncategorised"
  ["summary"]=>
  string(0) ""
  ["date"]=>
  string(25) "2021-04-20T12:29:24+00:00"
  ["edited_date"]=>
  string(25) "2021-04-20T12:29:24+00:00"
  ["author"]=>
  string(3) "844"
  ["editor"]=>
  string(3) "844"
  ["impressions"]=>
  int(0)
  ["direction"]=>
  string(4) "auto"
  ["language"]=>
  string(1) "*"
  ["parent"]=>
  NULL
  ["published"]=>
  string(1) "1"
  ["image"]=>
  array(0) {
  }
  ["name"]=>
  string(13) "Uncategorised"
  ["metadata"]=>
  array(4) {
    ["og:title"]=>
    NULL
    ["og:url"]=>
    NULL
    ["og:image"]=>
    NULL
    ["og:description"]=>
    NULL
  }
}
"
    ["tags"]=>
    array(0) {
    }
    ["date"]=>
    string(25) "2021-04-27T08:36:58+00:00"
    ["edited_date"]=>
    string(25) "2021-04-27T08:36:58+00:00"
    ["published_date"]=>
    string(25) "2021-04-27T08:36:58+00:00"
    ["archived_date"]=>
    NULL
    ["author"]=>
    string(3) "844"
    ["editor"]=>
    string(3) "844"
    ["image"]=>
    array(0) {
    }
    ["impressions"]=>
    int(0)
    ["direction"]=>
    string(4) "auto"
    ["language"]=>
    string(2) "fr"
    ["published"]=>
    string(1) "1"
    ["archived"]=>
    string(1) "0"
    ["trashed"]=>
    string(1) "0"
    ["featured"]=>
    string(1) "0"
    ["links"]=>
    array(0) {
    }
    ["ordering"]=>
    int(1)
    ["metadata"]=>
    array(8) {
      ["og:title"]=>
      NULL
      ["og:url"]=>
      NULL
      ["og:image"]=>
      NULL
      ["og:description"]=>
      NULL
      ["article:published_time"]=>
      string(25) "2021-04-27T08:36:58+00:00"
      ["article:modified_time"]=>
      string(25) "2021-04-27T08:36:58+00:00"
      ["article:expiration_time"]=>
      NULL
      ["article:tag"]=>
      array(0) {
      }
    }
    ["fields"]=>
    string(48) "object(ExtJoomlaModelEntityFields)#2138 (0) {
}
"
    ["name"]=>
    string(6) "French"
  }
}