• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Internationalization of Java Apps to Arabic  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings

I am trying to get the java GUI to write in arabic.. I have actually reached output but I still have questions
Here is what I did:


1- Created the *.properties files in the usual way bel notepad, but named the file .txt instead of .properties
ex. greetings = اهلا

2-converted the arabic text to unicode escapes using native2ascii as follows:
ex: native2ascii -encoding cp1256 MessagesBundle_ar_EG.txt MessagesBundle_ar_EG.properties

3- The new .properties file now can be used successfully in swing components.

Now, this works.. I understand that I can do it another way, by making the properties file using a unicode ( UTF-8 ) editor.. which i tried to do using Yudit. But the result is strange characters.

Please Help.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem of strange characters comes when you save the file containing characters in a format that does not support all the characters in your file. So recheck the file format that you saved the file in.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually properties files can not be Unicode. That is with the exception of xml format properties files. The XML format is very nice, but you can't use the automatic Resource Bundle searching algorithm in the ResourceBundle class. Check out http://www.ibm.com/developerworks/java/library/j-tiger02254.html

Hope the helps,
Eirik Rude
i18ncookbook.com
 
Moeness Baradei
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the xml way Eirik.
It is important that i can write in arabic and not in unicode escapes in the file for maintainability.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!