• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Internationalization of Java Apps to Arabic

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic