So I'm in France for a while, working on this travel website with Josh and Sim. It is freakishly warm here. Actually it seems to be getting warmer. Feels like summer, only greener.
Here are some screenshots of what we've been working on:
So I'm in France for a while, working on this travel website with Josh and Sim. It is freakishly warm here. Actually it seems to be getting warmer. Feels like summer, only greener.
Here are some screenshots of what we've been working on:
I've been using the globalize-rails plugin for translation and localisation of my webapp. I'm fairly happy with with the plugin - it makes a good attempt to globalise most aspects of your application including strings in views and strings used anywhere else (uses the same mechanism, a .t method on instances of the String class) and also data in the database. This is the complicated bit - efficiently loading translations when records are loaded using a non-default locale. Seems to work though pretty well though but with two limitations:
find_by_sql. I guess this isn't really surprising but as my main 'search' function has to use findby_sql I suspect it might cause me some problems. Maybe there is a way to join with the globalizetranslations table and have it load translated attributes when it unmarshals to ActiveRecord objects.I've created a reasonable UI for translating data:

In my view (say _form.rhtml) I have something like:
<%= text_field 'space_decl', 'name' %>
<%= translation_links 'space_decl', 'name' %>
Here's the helper module. The css just sets the alpha for untranslated languages:
span.flags img {
margin-right: 4px;
}
span.flags img.todo {
filter: alpha(opacity=50);
-moz-opacity: .50;
opacity: .50;
}