Foren

Non-latin characters in portlet titles

Ildar Khaziakmhetov, geändert vor 14 Jahren.

Non-latin characters in portlet titles

New Member Beitrag: 1 Beitrittsdatum: 19.01.10 Neueste Beiträge
Hello,
I have a problem with portlet title on page. That title has russian characters. Displayed portal page has utf-8 encoding and portal.xml has it also. Though theese characters are not displayed correctly now. I hope you will help me.
This is my portlet.xml file:
<!--?xml version="1.0" encoding="UTF-8"?-->

<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0">
	<portlet>
		<portlet-name>PDNChartPortlet</portlet-name>
		<display-name>График результатов комплекса ПДН</display-name>
		<portlet class>com.tatneft.cpmm.portlets.PDNChartsPortlet.PDNChartsPortlet
		<supports>
			<mime-type>text/html</mime-type>
			<portlet-mode>VIEW</portlet-mode>
		</supports>
		<portlet-info>
			<title>График результатов комплекса ПДН</title>
		</portlet-info>
	</portlet>
</portlet></portlet-app>
thumbnail
Jason Reast-Jones, geändert vor 14 Jahren.

RE: Non-latin characters in portlet titles

New Member Beiträge: 20 Beitrittsdatum: 10.10.08 Neueste Beiträge
Hi Ildar,

You should use a Java resource bundle for your portlet. Have a look at this Wiki article. paying particular attention to the paragraphs that begin
"Java can only read Unicode characters..." and use of the native2ascii tool
"There are three standard keys defined..." for setting portlet title etc.

You basically want to be looking to add these tags into your portlet.xml and building the resource bundle (properties file) using the native2ascii tool:
      <supported-locale>ru</supported-locale>
      <resource-bundle>com.my.portlets.resource.Bundle</resource-bundle>


Hope that helps.

Jason