This blog is mainly about Java...

Friday, July 4, 2008

How to change the language of your Firefox

I have installed ubuntu on a HP Compaq 6910p for my mom. She is not so fluent in english, so she wanted everything in Norwegian. I thought first that it would be easy to install firefox in norwegian. Boy was I wrong. Yes, I can easily download firefox in the language I wanted, but I wanted to modify the already existing mozilla firefox that was in Ubuntu Hardy Heron. This because all the plugins and whatnot was already installed for me.

Anyways, about two days worth of Googling, and I found a way.
What you need to do is go to this page:

http://releases.mozilla.org/pub/mozilla.org/firefox/releases/
Then you want to find your version of firefox, choose xpi, and then the language you want for firefox, and voilla! Enjoy...

Generating InnoDB engine and UTF-8 for MySQL using hibernate

I found these blogs:

http://blog.tremend.ro/2007/08/14/how-to-set-the-default-charset-to-utf-8-for-create-table-when-using-hibernate-with-java-persistence-annotations


and

http://neoexpedition.wordpress.com/2007/11/01/persisting-japanese-characters-in-db-using-hibernate

They had the same problem as me, on how to generate InnoDB engine and UTF-8 for MySQL through hibernate.

This is the solution for doing it:

In persistence.xml or hibernate.cfg.xml (depending on what you are using), you add this line to get InnoDB as engine.

<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>


or

<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect">


if you are using MySQL 4.x.

To get utf8 as default charset, you have to create the database as default charset utf8 and hibernate will do that automatically for you.

create database foo default charset utf8;

Labels