Meb Faber’s CAPE value model returned 21% in 2013 but seemingly didn’t do so well in 2014. However that’s only the case if you’re looking at your returns in USD. converting the start and end of year values to euros and local currency, the return is around zero. You can see my CAPE 2014 data in Google sheets. OK, so an average return of 0% is nothing to write home about, but it’s not quite as bleak as -13%. The next question is how easy it would be to hedge the currency risk. Any ideas? Also it would be interesting to see what the 2013 returns were in local currency. Maybe that’s a project for tomorrow.

For the past couple of weeks I’ve been working on a site developed in Joomla. This wasn’t by choice, but it was a good chance to learn more about the CMS. The site is available in three languages so the question of content translation quickly came up.

Plugins like FaLang, jDiction which allow you to translate entire articles via a web interface. The problem with these plugins is that if an article contains html or javascript, this needs to copied into the translated version, thereby meaning 3 copies of code need to be managed,

Plugins like EasyLanguage and Multilanguages CK which allow you to tag strings for translation in templates, rather than translating entire files. However both these extensions require the translated text to be inserted directly into the source file.

an easy way to manage translation strings. to extract them for translation and integrate the translated text. My german isn’t up to the task, so someone else will be translating the site. I’ve got better things to do than cut-paste strings into a spreadsheet, then cut and paste the translations back.

Easylanguage seemed to be the most suitable (small codebase, well written, easy to understand code) so I spent a few hours yesterday adding my feature requests. It works in the following way :

mark strings for translation in articles, categories, templates, menus, anywhere with the following syntax: {lang}translate me{/lang}. You can also leave the default easylanguage syntax: {lang fr}texte en français{/lang}{lang de}Satz in Deutsch{/lang} and this will be used if there is nothing in the translation file.

Turn on automatic file creation.

Browse your site – visit every page and the translation file is automatically created.

Translate the strings in the file language/de-DE/de-DE.easylanguage.csv (or the intl of your choice)

Turn off automatic file creation.

That’s it.

You can download my updated version of the plugin here. It’s not prefect, but it suits my needs and it only took 2 hours. I’m posting this in the hope that it will be useful for someone else. If you have any comments or imporvements, let me know. Next feature request is the ability to manage the translation viles via the admin interface

There are many different language learning strategies, but the one thing you’ll hear again and again is the importance of immersing yourself in the language. Obviously the best way to do this is to live in the country where your language is spoken, but if that’s not possible, listening to podcasts is the next best thing, as it will help you recognise the sound of the language and start to learn the pronunciation. Whilst learning German, I listened to the Tagesschau daily news podcast. The subjects aren’t always relevant, and you do end up learning a lot of words with limited daily use. Bundesregierung (federal government) and Verteidigungsministerium (defense department) are two that come immediately to mind. Despite this, actively listening to real German for 10 minutes every day helps you to rapidly increase your comprehension levels.

If you’re an intermediate or advanced level learner, you can find interesting podcasts in iTunes by changing your country in iStore and looking at the top podcasts for your country. You can do this by following the “Change Country” link at the bottom of the iTunes Store window.

As I’m starting from zero with Portuguese, Podcasts for native speakers will be less useful initially, so I’ve decided to start off with a few websites and podcasts aimed specifically at beginners. This will specifically help me to learn pronunciation basics as well as some basic vocabulary and phrases.

In the order I found them, I’ve looked at:

BBC Talk Portuguese – an on-line video Portuguese course for beginners. A series of 10 short clips with basic vocabulary and phrases aimed at beginning language learners. You can listen to the pronunciation of each phrase and there are short descriptions of the main rules of pronunciations. Unfortunately the full HD videos are only available in the UK, making this less useful for me. Each lesson takes under 5 minutes so I’ve decided to listen to a couple of these every day for the rest of the week. There is also a course for learners of Brazilian.

One Minute Portuguese – A series of 10 “supposedly” one-minute podcasts, purporting to teach you basic words and phrases to “impress your portuguese friends”. Each podcast actually lasts around 4 minutes and contains lots of superfluous english (“Let’s hear that again”, “One more time”, “Can you imagine how impressed your friends would be if you wished them ‘Happy birthday’ in Portuguese?”). Within the first 30 seconds of listening to this podcast I was already feeling frustrated and annoyed at my time being wasted. It could be useful for someone who has never learned a foreign language, someone lacking confidence in their language learning ability, or someone who wants to know a few basic words for use on holiday. I’ll listen to a couple of these every day too (if I can force myself to sit through them).

Brazilian pod class – as it’s name suggests, its for learning Brazilian. the podcasts are free but you need to pay for the learning guides. Each podcast lasts around 10 minutes and contains a real Portuguese conversation.

If you are an intermediate or advanced learner, you can try listening to Portuguese By SBS Radio, a portuguese language podcast created by SBS, an Australian broadcaster

So, for the next couple of days, I’ll be listening to a couple of these beginners podcasts every day. I’ve also completed DuoLingo level 2. I’m also going to start learning some vocabulary. More about that tomorrow. 39 days to go…

I’m going to be spending a long weekend in Lisbon in October and thought it would be interesting to see how much Portuguese I can learn in the next few weeks. I’ve been to Portugal several times before and each time I regret not being able to converse with the locals. After 2 weeks in the Azores a few years ago I managed to communicate using Spanish with (what was probably a rather bad approximation to a) Portuguese accent along with a few basic Portuguese words thrown in, but the result wasn’t pretty, although it got me a few smiles along the way.

Ok, so I’m not planning on becoming fluent in 5 weeks (well it would be nice, if a little unrealistic…). The idea is to try out various language learning sites, tools and methods and see what works for me. I’ll be spending an hour a day (if I can motivate myself) and reporting back here on my progress.

My first step was changing the language on my phone, which is always amusing. My phone has been in German for a while now, but I get the impression that I already understand more in Portuguese than I did with a German iPhone, after 2 years of learning German. Next step, basic vocabulary. I think I’ll start with DuoLingo, as I love their ‘Gamification’ of language learning.

Apart from spending copious amounts of time learning Spanish German, I’ve also been researching the most effective methods for language learning. Meta-language learning, I guess.

My first discovery was Anki, or SRS systems in general. I’ve got a german Anki deck that I’ve been building for the past year or so, although it hasn’t been updated in a while.

I was recently reading about 10 000 sentences. For me, it sounded like the quickest way to rapidly acquire new language skills. The only problem was finding a source of sentences. AJATT recommends building your deck from sentences you find while learning the language, and many people on the web warn against using someone else’s deck.

When I found out about Tatoeba, I realised that it would be possible to quickly build a personalised deck using sentences of your choice. TaToTen.com is the result.

The idea is to choose sentences that you think will be useful, rather then downloading a bunch of random sentences. One (rather large) caveat is that there are many errors in the Tatoeba corpus, so you shouldn’t blindly trust the translations.

My todo list for the site contains the following items (at the moment) :

Search functionality to list sentences containing specific words

Ordering the sentences by quality or popularity so bad sentences will be less visible. If you have any ideas about how to do this, I’d love to hear them

I’ve been meaning to write about this for literally years, but never got round to it. Hopefully this will be useful to someone. After an only partially sucessful attempt to manage symfony i18n strings in a MySQL DB, I finally gave up and reverted back to the default XLIFF file method. One of the reasons for initially wanting to store the translations in a DB was to build an easy to use interface to allow translators to easily find untranslated strings. Unfortunatley this didn’t work as well as I was hoping, and the alternatives (installing pootle, or getting translators to install and learn how to use an xliff tool) werent’ much better.

I finally decided that the easiest way to update translations would be by dumping untranslated strings to a file before sending them to a translator. Unfortunately I couldn’t find a way to easily dump strings to a file and reload translated strings, so I wrote a couple of new tasks to do this for me.

You need to create the following two files: lib/tasks/sfI18nDumpTask.class.php

[php]

<?php
/*
* Current known limitations:
* – Can only works with the default "messages" catalogue
* – For file backends (XLIFF and gettext), it only saves/deletes strings in the "most global" file
*/

Before dumping the new strings to a file, you should first add any new untranslated strings using the builtin symfony i18n:extract command: [bash] ./symfony i18n:extract –auto-save –display-new frontend <culture> [/bash] Then you’re ready to dump the new untranslated strings to a file : [bash] ./symfony i18n:dump frontend <culture> –untranslated > untranslated.csv [/bash] You can then import this file into your favourite spreadsheet program. In NeoOffice this is done by opening a fresh spreadsheet and importing the data via “Insert” > “Sheet from external file” and making sure to add pipe ‘|’ as field seperator. YMMV in your spreadsheet tool of choice. Once the translations have been added in the 4th column of the spreadsheet, save the document as a pipe separated csv file before using the following command to reload the translated strings: [bash] ./symfony i18n:dump frontend <culture> translated.csv [/bash]

Talking about language learning, as I was, I found an article on the BBC website about hyperpolyglotism. I was pretty happy with my acceptable french, moderate spanish and fairly miserable german until I saw that video.

I’ve been told by several people that German is an easy foreign language for English speakers to learn. My experience in the past few months leads me to believe otherwise. I always thought that German was a logical language where it was enough to follow the rules. Well that may be true, but there are hundreds of rules and as many exceptions.

Despite this, I haven’t been put off, and fairly early on I discovered Anki which is an incredible tool to help with learning vocabulary (Apparently this kind or tool is called an SRS or Spaced repetition system. Flashcards to you and I). Vocab learning was never my strong point, but Anki really helps. Whether I have 10 minutes on the U-Bahn or an hour in the evening, I can quickly assimilate a few dozen more words.

However the dearth of dictionary files was an initial problem, so I have created a beginners file from various sources, which may be of use to any other beginning German learners. Check out my English-German Anki deck. I’ve been adding to this file for the past few months, and I hope it is as error-free as possible, but if you do find any errors, please let me know and I’ll correct them.

I’ve also uploaded the file to Google docs, if anyone wants write access to modify/improve the data, let me know. I’ll update the anki file with the latest greatest version.

Sitting at home in Paris on a cold wet september night, those three weeks of holiday in August seem like a distant memory. We travelled from Paris to Bordeaux, visiting the surrounding area, then up into the Pyrennées for a few days in the mountains, before continuing down the catalan coast via Cadaques to Barcelona.

In that short time we discovered some incredible restaurants. If you’re in the area, here’s a summary of the best discoveries.

Bordeaux

Bordeaux is a city that has undergone a revolution in the past 10 years. Until the end of the ’90s the centre of the city had a dirty, dusty, polluted feel to it. Since the beginning of the new millenium however, it has been reborn, after the car was banished from the narrow streets of the centre and the exteriors of most of the buildings were given a good clean. Today the town is much more welcoming, if somewhat touristic.

If you’re in Bordeaux for a few days, try to visit some of the following restaurants:

Le petit commerce – situated in a tiny pedestrian steet between the Place st. Pierre and Place du Parlement, this bistrot-style restaurant is open for lunch and dinner throughout the week. The lunchtime menu is a bargain at 12 €. If the weather is good, try to arrive early to get a seat on the terrace.

For something a little more traditional, try Le plat a oreilles. This small family-run restaurant is somewhat out of place on Rue des Faussets amongst a bunch of mediocre ‘attrape-touriste’ restaurants. Open every evening, the menu at 25€ is great value. Everything (from the starter to the desert) is home-made. the house wine was respectable too and reasonably priced

I was a little dissapointed by le Bô Bar. After having read the review in Le guide du Fooding I was curious to discover their concept – the wine is served anonymously by the glass, with the only choice being between a light, medium, full-bodied red, or a fruity or dry white. No other clues are given as to the provenance of the wine. While all of the wines we tasted were wonderful, the food was a disapointment, I had the impression our meal was reheated in a microwave, the dry congealed rice was simply unappetizing.

On sunday morning, you can’t do better than Karl in Place du parlement. We arrived early and were lucky to get a seat in the sun on the terrace, but 1/2 hour later and people were queueing up to get a seat inside. An enourmous selection and huge portions, highly recommended

Its late so I’ll stop there. Tomorrow I’ll try and jot down some of the best restaurants in Arcachon, Saillagouse, Cadaques and Barcelona

Anyone using Sympfony 1.2 will probably have realised by now that the i18n:extract task doesn’t extract strings from any files in lib/form/*

This useful thread shows how to dump all translated strings into a file which can later be parsed by the i18n:extract task, unfortunately it creates huge files, and needs to be disabled in production environments for performance reasons.

After a quick search through the code, I have patched my code to only dump untranslated strings to the i18n.temp file.

Here’s the patch for lib/vendor/symfony/lib/i18n/sfMessageFormat.class.php