South of the Border – West of the Sun

South of the Border, West of the Sun

South of the Border – West of the Sun

I suppose it was very fitting that I read Murakami’s South of the Border, West of the Sun book during my trip to Japan. It is certainly a good book for a trip, thin enough to fit nicely in the seat pocket in the plane, dense enough that once you finished it, you don’t feel the need to start another one immediately

The book tells the story of the relationship, or the non-relationship between two persons who knew each other in school. As often, the story itself is less important that the interactions between the characters, the words and the silences. No fantasy element in this book, just people torn between their middle age reality and their childhood memories.

South of the Border, West of the Sun

Vintage Books
ISBN : 978-0-099-44857-0

The narrator goes from a school boy to being the owner of three jazz clubs in the Japan of the 90’s, going through the student revolts of the late sixties in a kind of detached way. While this autobiographic touch certainly gives some depth, for me it felt a bit repetitive, as these themes come out often in Murakami’s books.

Flattr this!

Phone Icon

Roaming apps


Mobile phones are slowly replacing so-called desktop computers (which are usually laptops) as the default device, and development practices are slowly changing to adapt to this. Much can be said about screen resolution, input methods, the tradeoff between a mobile web page and a mobile app, but there is usually one subject that is not talked about (much): roaming.

I just spent around 20 days in Japan, with only a very limited data packet: 200 megabytes. This was enough for basic communication (mail) travel applications (booking, schedule), maps (I have a lousy sense of orientation) and consulting some web sites. Of course, we had WiFi access in many places: most hotels, a few coffee places and some touristic spots.

In that setting, mobile apps are way more useful than web pages:

  • Mobile network access can be restricted (on iOS at least), this means that resource hungry systems like social networks won’t eat up your data quota. Each app has its own silo of permissions.
  • Mobile apps are pre-loaded on the phone and updates can also be restricted to WiFi, so only the real data is downloaded over the mobile network.
  • Offline access in mobile apps is a common feature, not something experimental.

The main issue with apps is that most public WiFi access do some form of HTTP redirection / interception, so you typically need a simple web-page that does not use HTTPS to trigger the captive portal logic, my home-page is pretty convenient for this, as it only weights 1594 bytes. Maybe I should create a simpler page for this purpose.

Smartphone icon © G.Hagedorn Creative Commons Attribution-Share Alike 3.0 Unported

Flattr this!

local-fr_FR.po →

Localising WordPress categories

local-fr_FR.po →

I’m using the xili language plugin to handle the multi-lingual aspects of this blog. While the plugin is hardly user-friendly I managed to make it work, and built a child theme that patches the Sixteen theme so it works properly with multilingual data.

The next step was localise post categories. In theory, I could have used the xili dictionary plugin, but that one is even more confusing, so in the end, I decided to just write the localization files (so-called gettext files) by hand. While this sounds hardcore, it really isn’t.

Do do this, you really only need a text editor and a tool to generate .mo (machine readable) out of .po (portable) files. Here I’ll use msgfmt which is available on most Unix installations.

Basically, your .po file is a list of translation from a source language (typically english) to some other language. The file that explains how to translate my categories looks like this:

msgid ""
msgstr ""
"Project-Id-Version: Sixteen-child\n"
"Report-Msgid-Bugs-To: root@localhost\n"
"Last-Translator: Matthias Wiesmann <root@localhost>\n"
"Language-Team: Matthias Wiesmann <root@localhost>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr_FR\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"

msgid "Stories"
msgstr "Histoires"

The only interesting line in header is the one that specifies that the language for this file is fr_FR, the last two lines explain how to translate Stories into French: Histoires.

This file should be named local-fr_FR.po and placed into the languages directory of your theme. WordPress does not understand .po files directly, they need to be compiled to .mo format, this is done with the following command:

msgfmt local-fr_FR.po -o

Flattr this!

Screen Capture – Active: Sixteen Child

Sixteen child theme

Screen Capture – Active: Sixteen Child

The WordPress theme I used on this blog got recently updated, while the changelog claims that:

  i) Corrected Issues reported with Language file.
  ii) Renamed changelog file.	
  iii) Removed Unwanted Description Title for Product Pages.

The various issues I found related to localization and internationalization do not seem to have been really fixed. So instead of patching the theme once again, I did what Norbert suggested when I complained about that problem in a previous blog post: I moved all the customizations into a child theme. The child theme is really just a set of patched files from the original theme.

The set of files can be found in this gitub repository.

Flattr this!

All countries 70 cl 40% vol. USA - Canada 750 mL 40% Alc./Vol UPC: 752183585835 EAN: 3278480629302

Primary Keys (7) those pesky units

All countries 70 cl 40% vol. 
USA - Canada 750 mL 40% Alc./Vol
UPC: 752183585835
EAN: 3278480629302

Localisation is hard, in particular in domains where there are legal requirements, so you end up with labels that claim that the same bottle has different physical volumes depending on the country.

The packaging suffer from the same schizophrenia about product codes, as it has two GTINs, one UPC, 752183585835 registered with American Wine Distributors Pier 23 The Embarcadero Suite 201 CA-94111 San Francisco USA and one EAN 3278480629302 registered with Godet Frères SAS 34 Quai Louis Durant, BP 70041 17003 La Rochelle CEDEX 1 France.

As this is a bottle of French Cognac, it seems the product was first assigned an EAN, and when the product needed to be sold in the US, a UPC was added to work with old systems in the US and Canada. I wonder if cash registers in Europe have two entries in their databases, one with the EAN, and one with the UPC, as European scanners will recognise UPCs.

Back of package with two GTINs CC-BY-SA, attribution Isabelle Hurbain-Palatin

Flattr this!