Resource bundles in Java for Teamsite

Posted: 22 September 2009 in Uncategorized

If you want to have the japanese, russian or other languages in teamsite, you might want to use resource bundles to translate parts of the page. I’m not going to do an introduction to resource bundles, you can find one here.

However, there are a couple of gotchas with teamsite. The first one I found was with the IDE you use. Make sure you edit the files in UTF-8 (or whatever other encoding you need to use). I was using Netbeans and because I was editing a file not in a project, I think the encoding wasn’t set porperly. When I was uploading the file back into teamsite, either the IDE or the upload tool was converting it to ASCII and I ended up with “?” characters everywhere.

To solve this problem, I made a new project, set the encoding for the project to be UTF-8 and used the import tool for my java class. This other post was quite helpful in explaining all of it.

I then attempted to use the make_toolkit.sh and it was complaining a lot about my characters not being convertible using the ASCII encoding.

In order to solve this second problem, I used the native2ascii utility that comes with Java and converted it to ascii successfully. The class compiled fine after that.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s