<ac:include /> (server-side widget)

<ac:include /> is an experimental JSF widget. Basically, it's a language-aware version of <ui:include />.

<ac:include /> includes an XHTML just like <ui:include /> does, but it tries to find
a version of the file that corresponds to the readers preferred language. It reads the locales sent by the browser and adds
the two-letter language shortcut of the language to the file name. If this file exists, it is included. If not, the next language
in the locale settings is tried. If none of the languages yields a result, <ac:include /> works exactly like
<ui:include />: it includes the file defined by the src attribute without further ado.

Example

The page you're currently reading uses <ac:include /> to display the text in your language like so:

The first tab is the language-aware tab. The files content_en.xhtml,content_de.xhtml and content_pt.xhtml exist,
so <ac:include /> displays the text in English, German or Portugese. If the browser happens to request none of these languages,
<ac:include /> defaults to content.xhtml (which in turn includes content_en.xhtml).

The other tabs are traditional <ui:include /> statements. So you can read any language, even if it isn't your browser's preferred language.

<ac:include /> (server-side widget)

<ac:include /> is an experimental JSF widget. Basically, it's a language-aware version of <ui:include />.

<ac:include /> includes an XHTML just like <ui:include /> does, but it tries to find
a version of the file that corresponds to the readers preferred language. It reads the locales sent by the browser and adds
the two-letter language shortcut of the language to the file name. If this file exists, it is included. If not, the next language
in the locale settings is tried. If none of the languages yields a result, <ac:include /> works exactly like
<ui:include />: it includes the file defined by the src attribute without further ado.

Example

The page you're currently reading uses <ac:include /> to display the text in your language like so:

The first tab is the language-aware tab. The files content_en.xhtml,content_de.xhtml and content_pt.xhtml exist,
so <ac:include /> displays the text in English, German or Portugese. If the browser happens to request none of these languages,
<ac:include /> defaults to content.xhtml (which in turn includes content_en.xhtml).

The other tabs are traditional <ui:include /> statements. So you can read any language, even if it isn't your browser's preferred language.