Podcastpedia.org can be accessed today in four languages – English, German, French and Romanian, with Spanish planned for the near future. In computing this is called internationalization (i18n). The post presents how this is configured under the hood with the help of Spring 3 MVC.

Application Context Configuration

Message Resource Files

Normally in the Java world, the locale-specific data is stored in message resource files. In Spring you configure it by adding the following bean org.springframework.context.support.ReloadableResourceBundleMessageSource to the application context:

<!-- Application Message Bundle -->
<bean id="messageSource"
  class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
  <property name="basename" value="classpath:messages/messages" />
  <property name="defaultEncoding" value="UTF-8"/>
</bean>

The beginnings

It all began back 2002, my first year at the university in Romania, when I wanted to improve my German skills. At that time my grammar was pretty good, my writing skills were satisfying, but I still had difficulties expressing myself and understanding what the Germans are talking about on TV. Being a self-taught kind of person, I began looking for ways to improve that. On my research I stumbled upon Deutsche Welle’s website, which had lots of useful resources for learning German. I first listened to Langsam Gesprochene Nachrichten (Slowly Spoken News), which turned out to be very accesible and easy to understand. Then followed „Deutsch – warum nicht?“ (German- why not?) and „Marktplatz“ (marketplace). Back then you could download audio files with transcripts from the website – I still have like half of tree worth of paper of that lying in my basement, sorry…

Continue Reading ...

Sample Link Post

This theme supports link posts, made famous by John Gruber. To use, just add link: http://url-you-want-linked to the post’s YAML front matter and you’re done.

Looking for ways to improve Podcastpedia.org‘ mobile user-friendliness, I have discovered Google’s PageSpeed Insights . After analyzing the home page, a podcast’s page (The Naked Scientists Podcast – Stripping Down Science), an episode page and scoring an average of 70 out of 100 (even worse on mobile) two points needed urgent fixing:

1. Enabling compression

Compressing resources with gzip or deflate will reduce the number of bytes sent over the network at the expense of slightly increased CPU utilization. Smaller files also mean less bandwidth used and faster transfer time. At Google’s recommendation I have enabled file compression on the Apache web server, for which you have to use the mod_deflate module.

1.1 Enable mod_deflate on GoDaddy

To enable mod_deflate on a GoDaddy Virtual Private Server account, you have to use Easy Apache and the same procedure as in Troubleshooting WordPress installation on GoDaddy VPS. You need to check the Deflate option at step number 5. Exhaustive Options List and recompile the Apache Server.

easy_apache_deflate

To verify the module mod_deflate is active run the following command on CentOS

httpd -M | grep deflate_module
Continue Reading ...

I recently switched to Eclipse Kepler, being very dissapointed in the Juno Version – sometimes it took a couple of seconds just to switch between open tabs, and that on a 16 GB RAM machine with a 8-core processor… Anyway, I will shortly present here how I have configured Eclipse for the further development of Podcastpedia.org:

Continue Reading ...