Skip to content

Multilingual Websites with Ruby on Rails (2)

2009 May 12
by meier

Part 2 – Variables, Validations, Model Classes

Web pages often contains sentences in which a single word is changing. For example, “You are logged in as xxxx.” For the translation, we can obviously assemble the sentence from the components. There is often a problem, because the word order is different in different languages .

Better is the so-called interpolation, as Ruby itself also offers. The string contains a marked variable, which will be replaced at run time. The Yaml file specification does not use the Ruby syntax. Instead, you mark the variable with double curly brackets.

# Definition
  logmsg: "You are logged in as {{name}}."
 
# call
I18n.translate(:logmsg, :name => 'Administrator')
# or short form
t :logmsg, :name => 'Administrator'

read more…

SQL: Set a Field from a linked Table

2009 May 4
tags: , ,
by meier

A little hack for the Joomla Community Builder

Recently, I received a job request. An existing web application will be greatly expanded, and therfore converted to use the CMS “Joomla”. For the management of members  the extension “Community Builder” will be used.
Previously, users had a number as login name. This number should now be available in a field “member number” (german: mitgliedsnummer), and the numbers from existing users should be transferred. So much for the request from a customer perspective. read more…

Multilingual Websites with Ruby on Rails

2009 April 11
by meier

Part 1 – Overview

Writing software for several languages is an ever recurrent challenge. Ruby on Rails provides solutions to most of the standard problems in web development. But it needed time until the version 2.2. for the “Internationalization API ” to become an official part of Ruby on Rails. .

The Ruby-On-Rails Internationalization module

read more…

Jad Check on the servers from Google

2009 March 29

jad check service for online test of your jad files[g8ue5azsn9] The Jad check is a quality assurance tool for providers of mobile Java software.

The check examines the so-called Jad file on frequently occurring errors. Some errors are otherwise very hard to find, so you save time during troubleshooting. Other errors leads to installation problems on only a few phones. According to Murphy Law, typically the phones of the most important customers. As a provider the test helps to avoid trouble and increases your customer satisfaction.

read more…

(Deutsch) Turing Award für Barbara Liskov

2009 March 14
by meier

read more…

Webdesign and Mobiledesign in China

2009 February 14
by meier

Our culture determines what we like, much more than we think. You notice it when you come across a very different culture. There is a interesting report about chinese design for classic and mobile internet. read more…

Compare Strings with PHP

2008 November 23
tags: , ,
by meier

In my programming work I often switch between different programming languages. It’s not so difficult, but problems sometimes appear just at very simple things.

Strings in PHP are really easy to compare, there is the “==” operator. But there lurks a trap: read more…

Switch to our mobile site