Foren

How to include multilingual webcontent in resource importer for theme

thumbnail
Narsingh Pal, geändert vor 7 Jahren.

How to include multilingual webcontent in resource importer for theme

Junior Member Beiträge: 53 Beitrittsdatum: 18.01.14 Neueste Beiträge
Hi Guys,

I am working on 6.2 theme with resource importer. I am able to get the webcontents imported into site with single default language (english US in my case). Below is my sitemap.json
{
	"layoutTemplateId": "1_column",
	"publicPages": [
		{
			"layoutTemplateId": "1_column",
			"friendlyURL": "/about-us",
			"nameMap": {
				"en_US": "About Us"
			},
			"title": "About Us",
			"columns": [
				[
					{
						"portletId": "82",
						"portletPreferences": {
							"groupId": "${groupId}",
							"portletSetupShowBorders": "false",
							"displayStyle":"2",
							"languageIds":"en_US,fr_FR",
							"displayCurrentLocale":"true",
						}
					},
					{
						"portletId": "56",
						"portletPreferences": {
							"articleId": "aboutus.html",
							"groupId": "${groupId}",
							"portletSetupShowBorders": "false"
						}
					}
				]
			]	
        },
		{	
        }
	]
}


I am putting "aboutus.html" in Sample-Theme>docroot>WEB-INF>src>resources-importer>journal>articles folder

I want to know how can I add (french) translation of the above aboutus.html content in my resources importer, so that when user choose french language, he/she gets to see french version of the content
.


Many thanks in advance.


Regards
Narsingh Pal
thumbnail
Narsingh Pal, geändert vor 7 Jahren.

RE: How to include multilingual webcontent in resource importer for theme

Junior Member Beiträge: 53 Beitrittsdatum: 18.01.14 Neueste Beiträge
Any suggestions/pointers ?
thumbnail
Travis Cory, geändert vor 7 Jahren.

RE: How to include multilingual webcontent in resource importer for theme

Junior Member Beiträge: 73 Beitrittsdatum: 04.06.13 Neueste Beiträge
Hello Narsingh,

Sorry for your frustrations. When you add a translation option to the web content the XML content of the article is updated. So in your resources importer you could update your article to include a translation for French. Below is an example of a Basic Web Content that has an English and French translation.

<!--?xml version="1.0"?-->

<root available-locales="fr_FR,en_US" default-locale="en_US">
	<dynamic-element name="content" type="text_area" index-type="keyword">
		<dynamic-content language-id="fr_FR">&lt;p&gt;ceci est le contenu fran&amp;ccedil;ais&lt;/p&gt;</dynamic-content>

		<dynamic-content language-id="en_US">&lt;p&gt;this is the english content&lt;/p&gt;</dynamic-content>
	</dynamic-element>
</root>
thumbnail
Narsingh Pal, geändert vor 7 Jahren.

RE: How to include multilingual webcontent in resource importer for theme

Junior Member Beiträge: 53 Beitrittsdatum: 18.01.14 Neueste Beiträge
Thanks Travis,

The content along with its translation got imported, and is available in the web content editor, however when I try to preview this, the screen is blank.

I observed some extra "]]>" character in the web content editor, when I remove this manually, I am able to preview the content.
Attached is the screen shot for more details.

Request you to help me, resolve this as well.


Thanks and Regards
Narsingh Pal