<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://atk-framework.com/index.php?action=history&amp;feed=atom&amp;title=Multilanguage_node</id>
	<title>Multilanguage node - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://atk-framework.com/index.php?action=history&amp;feed=atom&amp;title=Multilanguage_node"/>
	<link rel="alternate" type="text/html" href="https://atk-framework.com/index.php?title=Multilanguage_node&amp;action=history"/>
	<updated>2026-09-20T23:09:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://atk-framework.com/index.php?title=Multilanguage_node&amp;diff=19630&amp;oldid=prev</id>
		<title>Bahati at 09:54, 11 March 2011</title>
		<link rel="alternate" type="text/html" href="https://atk-framework.com/index.php?title=Multilanguage_node&amp;diff=19630&amp;oldid=prev"/>
		<updated>2011-03-11T09:54:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:54, 11 March 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Howto|Easy|[[Jeroen van Sluijs]] &amp;lt;jeroenvs@&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ibuildings&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nl&lt;/del&gt;&amp;gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Howto|Easy|[[Jeroen van Sluijs]] &amp;lt;jeroenvs@&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;achievo&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;org&lt;/ins&gt;&amp;gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Intro ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Intro ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bahati</name></author>
	</entry>
	<entry>
		<id>https://atk-framework.com/index.php?title=Multilanguage_node&amp;diff=18344&amp;oldid=prev</id>
		<title>Jeroenvs at 15:31, 27 July 2010</title>
		<link rel="alternate" type="text/html" href="https://atk-framework.com/index.php?title=Multilanguage_node&amp;diff=18344&amp;oldid=prev"/>
		<updated>2010-07-27T15:31:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:31, 27 July 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   `body` text,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   `body` text,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   `is_published` tinyint(1) DEFAULT &amp;#039;0&amp;#039;,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   `is_published` tinyint(1) DEFAULT &amp;#039;0&amp;#039;,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &#039;&#039;&#039;`&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lng&lt;/del&gt;` char(2) NOT NULL,&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &#039;&#039;&#039;`&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lang&lt;/ins&gt;` char(2) NOT NULL,&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   PRIMARY KEY (`id`,&#039;&#039;&#039;`&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lng&lt;/del&gt;`&#039;&#039;&#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   PRIMARY KEY (`id`,&#039;&#039;&#039;`&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lang&lt;/ins&gt;`&#039;&#039;&#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  );&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jeroenvs</name></author>
	</entry>
	<entry>
		<id>https://atk-framework.com/index.php?title=Multilanguage_node&amp;diff=18341&amp;oldid=prev</id>
		<title>Jeroenvs: Created page with &#039;{{Howto|Easy|Jeroen van Sluijs &lt;jeroenvs@ibuildings.nl&gt;}}  == Intro == This howto shows the implementation of a multilanguage ATK (meta)node. It provides the possibility to s…&#039;</title>
		<link rel="alternate" type="text/html" href="https://atk-framework.com/index.php?title=Multilanguage_node&amp;diff=18341&amp;oldid=prev"/>
		<updated>2010-07-27T15:00:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{Howto|Easy|&lt;a href=&quot;/index.php?title=Jeroen_van_Sluijs&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Jeroen van Sluijs (page does not exist)&quot;&gt;Jeroen van Sluijs&lt;/a&gt; &amp;lt;jeroenvs@ibuildings.nl&amp;gt;}}  == Intro == This howto shows the implementation of a multilanguage ATK (meta)node. It provides the possibility to s…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Howto|Easy|[[Jeroen van Sluijs]] &amp;lt;jeroenvs@ibuildings.nl&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
This howto shows the implementation of a multilanguage ATK (meta)node. It provides the possibility to specify fields which should have language specific content. The language is based on the 2-character languagecode.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
In the siteroot/config.inc.php you can specify the languages you want to support:&lt;br /&gt;
 $config_supported_languages = array(&amp;quot;NL&amp;quot;,&amp;quot;EN&amp;quot;,&amp;quot;DE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
And the default language:&lt;br /&gt;
 $config_defaultlanguage=&amp;quot;NL&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Create a database table as usual, but add a &amp;#039;lang&amp;#039; column and add it to the PRIMARY KEY constraint, e.g.:&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE `news` (&lt;br /&gt;
  `id` int(11) NOT NULL AUTO_INCREMENT,&lt;br /&gt;
  `title` varchar(100),&lt;br /&gt;
  `body` text,&lt;br /&gt;
  `is_published` tinyint(1) DEFAULT &amp;#039;0&amp;#039;,&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;`lng` char(2) NOT NULL,&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  PRIMARY KEY (`id`,&amp;#039;&amp;#039;&amp;#039;`lng`&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
== Node ==&lt;br /&gt;
We use the following flags to create a multilanguage node:&lt;br /&gt;
* NF_ML (alias: NF_MULTILANGUAGE) - to enable the auto-multilanguage feature for this node&lt;br /&gt;
* AF_ML (alias: AF_MULTILANGUAGE) - to indicate which attribute is used to store the languagecode&lt;br /&gt;
&lt;br /&gt;
 class News extends atkMetaNode&lt;br /&gt;
 {&lt;br /&gt;
    protected $flags = NF_ML;&lt;br /&gt;
 &lt;br /&gt;
    static public function meta(atkMetaPolicy $policy)&lt;br /&gt;
    {&lt;br /&gt;
        $policy-&amp;gt;setType(&amp;quot;title&amp;quot;, &amp;quot;atkMlAttribute&amp;quot;);&lt;br /&gt;
        $policy-&amp;gt;setType(&amp;quot;body&amp;quot;, &amp;quot;atkMlTextAttribute&amp;quot;);&lt;br /&gt;
        $policy-&amp;gt;setType(&amp;quot;is_published&amp;quot;, &amp;quot;atkBoolAttribute&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
        $policy-&amp;gt;add(&amp;#039;lang&amp;#039;, &amp;#039;atkAttribute&amp;#039;, array(), AF_MULTILANGUAGE|AF_HIDE);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Your node now shows a &amp;#039;title&amp;#039; field in your default language. With the language-dropdown, you can switch the language of the second &amp;#039;title&amp;#039; field.&lt;br /&gt;
&lt;br /&gt;
When you add a new record, one record per language will be added to your table (so 3 in this case). The id&amp;#039;s will be exactly the same, so that&amp;#039;s why you need the combined PRIMARY KEY.&lt;/div&gt;</summary>
		<author><name>Jeroenvs</name></author>
	</entry>
</feed>