Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Weitzel
Language file format
October 21, 2011 8:46 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 186

Join Date: November 18, 2009

Recent Posts

I am having problems handling Language files within a new portlet (6.0.5 CE)
Scandic characters are not being displayed correctly.

I can copy the same keys to say Language_sv.properties within a hook and they are "read" and displayed fine, but I would rather maintain them with the portlet that they are for.
Example entry:
intro1=Ställ i temakontroll innehåll id av banner, ytterligare menyer och sidfot innehåll för denna webbplats, grupp eller samhället.

I have checked that the files are UTC-8 format but still get effectively corrupted character display

I have even copied the Language files that work from the hook and deleted the entries not applicable to the portlet but still they do not load corectly.

Is there any thing I am missing?

Dave
Ravi Kumar Gupta
RE: Language file format
October 21, 2011 10:06 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1219

Join Date: June 23, 2009

Recent Posts

You should use native2ascii command to convert the file. Try putting all the properties in a simple text file and then convert this file using native2ascii keeping encoding as utf-8 and then rename that file as language.properties of your choice.. that should work fine.
Sagar A Vyas
RE: Language file format
October 22, 2011 9:13 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 655

Join Date: April 17, 2009

Recent Posts

Hello Mr.Dave

Are you using Liferay IDE ?

If so, then you can convert to other language very effectively.

Right Click on Language.properties file >> Go to Liferay >> click on Build Languages.

Will take some time and produce all language properties file

Hope this help.

Thanks,
Sagar Vyas
Dave Weitzel
RE: Language file format
October 24, 2011 5:56 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 186

Join Date: November 18, 2009

Recent Posts

Have you actually used language files within your own portlets?
My concern is for portlet based language files as the main files in ROOT as amended via a hook are fine.
I have used textpad++ and other tools to convert to UTF-8 and set both windows and unix line endings, and also with or without the BOM.