<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../../User_Guide.ent">
%BOOK_ENTITIES;
]>
<section id="sect-User_Guide-Multi_Language_Navigation_Nodes">
	<title>Multi-Language Navigation Nodes</title>
		<para>
			&PRODUCT; supports a multi-language environment for your portal allowing you to internationalize any menu entry on the navigation.
		</para>
		<para>
			As the navigation bar is composed of nodes, you have to modify the display names of the nodes to enable this. Instead of entering the display name of the node in a defined language (English, for example) you have to use a language-neutral 'resource key'.
		</para>
		<para>
			This resource key is then used to define the label that is shown for that node on the navigation bar, the menu and the breadcrumb.
		</para>

	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-Key_Format">
		<title>Key Format</title>
		<para>
			The resource key format is: <emphasis role="bold">#{key}</emphasis>
		</para>
		<para>
			The resource key can contain any text that you consider appropriate to satisfy your business needs. It should, however, be human-readable and must not contain spaces.
		</para>
	</section>
	
	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-Creating_Keys">
		<title>Creating Keys</title>
		<para>
			There are two <!--three--> ways to create a key for a node: 
		</para>
		<orderedlist numeration="arabic">
			<listitem>
				<para>
					<xref linkend="sect-User_Guide-Multi_Language_Navigation_Nodes-Creating_Keys_using_the_Create_Page_Wizard"/>
				</para> 
			</listitem>
<!--			 <listitem>
			 	<para>
			 		<xref linkend="sect-User_Guide-Multi_Language_Navigation_Nodes-CreatingEditing_Keys_by_Edit_Page_Wizard"/>
			 	</para>
			 </listitem> -->
			 <listitem>
			 	<para>
			 		<xref linkend="sect-User_Guide-Multi_Language_Navigation_Nodes-CreatingEditing_Keys_using_the_Edit_Page_and_Navigation"/>
			 	</para>
			 </listitem>			 
		</orderedlist>
 
	</section>
	
	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-Creating_Keys_using_the_Create_Page_Wizard">
		<title>Creating Keys using <emphasis role="bold">Create Page Wizard</emphasis></title>

		<procedure>
			<step>
				<para>
					Open the <emphasis role="bold">Site Editor</emphasis> menu and pick <emphasis role="bold">Add New Page</emphasis>.
				</para>
			</step>
			<step>
				<para>
					Enter a name for this new page
				</para>
			</step>
			<step>
				<para>
					Enter a resource key in the <emphasis role="bold">Display Name</emphasis> field. 
				</para>
					<mediaobject>
						<imageobject role="html">
							<imagedata fileref="images/PageWizard.png" format="PNG" align="center" scale="110" />
						</imageobject>
						<imageobject role="fo">
							<imagedata fileref="images/PageWizard.png" format="PNG" align="center"  scalefit="1" contentwidth="160mm" />
						</imageobject>
					</mediaobject>
			</step>
			<step>
				<para>
					Click <emphasis role="bold">Next</emphasis>. On the next screen you may define a page layout out of existing templates.
				</para>
			</step>
			<step>
				<para>
					Click <emphasis role="bold">Next</emphasis> to finalize the page creation with portlets for instance. 
      			       </para>
			</step>
		</procedure>

	</section>
	
<!--	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-CreatingEditing_Keys_by_Edit_Page_Wizard">
		<title>Creating/Editing Keys using <emphasis role="bold">Edit Page Wizard</emphasis></title>

<warning>
<title>DOC TODO</title>
<para>
broken right now
https://jira.jboss.org/jira/browse/GTNPORTAL-787
SM: The menu path described below does not exist. Not sure if this is related to the JIRA listed here.
</para>
</warning>

			<procedure>
				<step>
					<para>
						Go to <emphasis role="bold">GateIn Start</emphasis> -&gt; <emphasis role="bold">Administration</emphasis> -&gt; <emphasis role="bold">Basic</emphasis> &gt; <emphasis role="bold">Edit Page Wizard</emphasis>
					</para>
				</step>
				<step>
					<para>
						Click on the <emphasis role="bold">Next</emphasis> button.
					</para>
				</step>
				<step>
					<para>
						Enter a resource key in the <emphasis role="bold">Display Name</emphasis> field.
					</para>
				</step>
		</procedure>
	</section> -->
	
	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-CreatingEditing_Keys_using_the_Edit_Page_and_Navigation">
		<title>Creating/Editing Keys using <emphasis role="bold">Navigation Management</emphasis></title>
			<procedure>
				<step>
					<para>
						Click on <emphasis role="bold">Site</emphasis> in the Toolbar then <emphasis role="bold">Edit Navigation</emphasis>
					</para>
					<mediaobject>
						<imageobject role="html">
							<imagedata fileref="images/NavigationManagement.png" format="PNG" align="center" scale="100" />
						</imageobject>
						<imageobject role="fo">
							<imagedata fileref="images/NavigationManagement.png" format="PNG" align="center"  scalefit="1" contentwidth="90mm" />
						</imageobject>
					</mediaobject>
				</step>
				<step>
					<para>
						Click on <emphasis role="bold">Add Node</emphasis>
					</para>
				</step>
				<step>
					<para>
						The Create/Edit node dialog appears. Enter a resource key in the <emphasis role="bold">Label</emphasis> field
					</para>
					<mediaobject>
						<imageobject role="html">
							<imagedata fileref="images/CreateEditNode.png" format="PNG" align="center" scale="110" />
						</imageobject>
						<imageobject role="fo">
							<imagedata fileref="images/CreateEditNode.png" format="PNG" align="center"  scalefit="1" contentwidth="160mm" />
						</imageobject>
					</mediaobject>
				</step>
			</procedure>
			<note>
				<title>Reusing Keys</title>
				<para>
					You can reuse the same resource key in several nodes.
				</para>
			</note>
	</section>
	
	<section>
		<title>Providing translation</title>
		<para>
			To provide a translation for the resource key used as page name, resource bundles must be provided within the web archive.
		</para>
		<para>
			 Property files (or XML resource bundles) must be located in: 
		<emphasis role="bold">WEB-INF/classes/locale/navigation/portal/[portalName]_[2letterCode].properties</emphasis>
		</para>
	</section>
	
	<!-- 
	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-Internationalize_Resource_Keys">
		<title>Internationalize Resource Keys</title>
		<para>
			&PRODUCT; organizes resource keys in resource files. Each file contains a list of keys and their translations in one specific language. 
		</para>
		<para>
			Each resource file holds keys for one language supported by Portal. This helps to structure the resource keys. Each resource file has a name and a language attribute.
		</para>

		<para>
			To utilize Internationalization features do the following: 
		</para>
		<procedure>
			<step>
				<para>
					Go to <emphasis role="bold">GateIn Start</emphasis> -&gt; <emphasis role="bold">Page Navigation</emphasis> -&gt; <emphasis role="bold">Administration</emphasis> -&gt; <emphasis role="bold">Internationalization</emphasis>
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/Internal2.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
			<step>
				<para>
					Select a data resource that you want to internationalize. You also may search the desired resource name with a specific language:
				</para>
				<orderedlist numeration="arabic">
					<listitem>
						<para>
							Enter a resource name in the <emphasis role="bold">Name</emphasis> field in the <emphasis role="bold">Search Resource</emphasis> form.
						</para>
					</listitem>
					<listitem>
						<para>
							Select a corresponding language for the resource.
						</para>
					</listitem>
					<listitem>
						<para>
							Click on the <emphasis role="bold">Search</emphasis> button to match all data resource and display the result in the table above.
						</para>
					</listitem>
					<listitem>
						<para>
							If you want to define a key for a node which belongs to a specific portal, search for a resource like <emphasis>[locale.navigation.portal.portal name]</emphasis>
						</para>
					</listitem>
				</orderedlist>
				<para>
					For example: if you want to define a key for a node of your portal <emphasis>Classic</emphasis> in French, you could search for the resource: <emphasis>locale.navigation.portal.classic</emphasis> with a value of <emphasis>fr</emphasis>in the <emphasis role="bold">Language</emphasis> field.
				</para>
				<itemizedlist>
					<listitem>
						<para>
							If you want to define a key for the node that belongs to a specific group, search for a resource like <emphasis>locale.navigation.group.group path]</emphasis>
						</para>
					</listitem>
				</itemizedlist>
				<para>
					For example: if you want to define a key for a node on the navigation <emphasis>administrators</emphasis> group that is the sub-set of the <emphasis>platform</emphasis> group in French, you could search for a resource: <emphasis>locale.navigation.group.platform.administrators</emphasis> which has <emphasis role="bold">fr</emphasis> in the <emphasis role="bold">Language</emphasis> field.
				</para>
			</step>
			<step>
				<para>
					Click the magnifying glass icon corresponding to a data resource to see details of the resource file. Click the <emphasis role="bold">Edit</emphasis> button in order to modify the content.
				</para>
			</step>
			<step>
				<para>
					Enter the resource key with the string that will be displayed as node name on the navigation bar.
				</para>
			</step>
			<step>
				<para>
					Click on the <emphasis role="bold">Save</emphasis> button.
				</para>
			</step>
		</procedure>
	</section>

	<section id="sect-User_Guide-Multi_Language_Navigation_Nodes-Example">
		<title>Walk-through</title>
		<procedure>
			<para>
				Below is a graphical walk-through illustrating how to change the language of a resource. In this case the language will be changed from English to French.
			</para>
			<step>
				<para>
					Go to <emphasis role="bold">Create Page Wizard</emphasis>, at step 1, select navigation and complete the values as shown below:
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/PageWizard.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
			<step>
				<para>
					Click <emphasis role="bold">Next</emphasis>, at step 2 and 3, set layout for page Test button.
				</para>
			</step>
			<step>
				<para>
					After creating page with that key, the node on the navigation bar will be displayed with name #{AAA}
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/AAANavi.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
		</procedure>
		<para>
			Now you have to define what to display instead of displaying the key.
		</para>
		<procedure>
			<step>
				<para>
 Go to <emphasis role="bold">GateIn Start</emphasis>, highlight <emphasis role="bold">Page Navigation</emphasis> and then <emphasis role="bold">Administration</emphasis>. Click on <emphasis role="bold">Internationalization</emphasis>.
				</para>
			</step>
			<step>
				<para>
					Search for the resource <emphasis>locale.navigation.portal.classic</emphasis> with the language set to French (<emphasis role="bold">fr</emphasis>)
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/Search.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
			<step>
				<para>
					Click the magnifying glass icon to see the content of that resource.
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/ResourceData1.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
			<step>
				<para>
					Click on the <emphasis role="bold">Edit</emphasis> button to modify the resource contents. In the <emphasis role="bold">Resource</emphasis> field, enter the key and assign the string to display.
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/AfterEdit1.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
			<step>
				<para>
					Click on the <emphasis role="bold">Save</emphasis> button.
				</para>
			</step>
			<step>
				<para>
					Go to GateIn <emphasis role="bold">Start</emphasis> -&gt; <emphasis role="bold">Administration</emphasis> -&gt; <emphasis role="bold">Language Settings</emphasis>: select French -&gt; Apply.
				</para>
			</step>
			<step>
				<para>
					The French translation of your new resource key appears on the menu.
				</para>
				<mediaobject>
					<imageobject>
						<imagedata fileref="images/Nouvel.png" format="PNG" align="center" width="444" />
					</imageobject>
				</mediaobject>
			</step>
		</procedure> -->
</section>


