Foros de discusión

Language file format

thumbnail
Dave Weitzel, modificado hace 12 años.

Language file format

Regular Member Mensajes: 208 Fecha de incorporación: 18/11/09 Mensajes recientes
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
thumbnail
Ravi Kumar Gupta, modificado hace 12 años.

RE: Language file format

Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
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.
thumbnail
Dave Weitzel, modificado hace 12 años.

RE: Language file format

Regular Member Mensajes: 208 Fecha de incorporación: 18/11/09 Mensajes recientes
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.
thumbnail
Sagar A Vyas, modificado hace 12 años.

RE: Language file format

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
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