Say we have some sites: uk.example.com, us.example.com and fr.example.com. the last one uses our French pages, the first two use our "English" pages. Is there an easy way to handle the minor but noticeable differences between American English and British English. It seems a pain to create separate nodes for all pages (or even one page) just because of the words "colo(u)r" and "meters"/"metres".
The only way I can think of is if we filter all our content as php and do
<p>The length of the hall is 4 <?php echo $meters; ?></p>
and then set the value of meters depending on what subsite it is. (We'll be using Domain Access to set up our subsites sharing one codebase).
[Not that I actually know how to do this, I just guess it's possible].
Anybody have a neater (or fuller) solution?
Comments
Hard but intresting problem
You have an interesting problem here. Your solution seems like it would be harder in the long run, but maybe some kind of string replace function would work? A custom module here maybe, you could then update the replace based on the language and have that up-datable in the admin area, and have it pulled based on the language.
Might be more work than you want there, but it would make for a cool module I think. Or you could just go with American English as its the right one to use...ha, just joking!
I wish I had the time to write this module....
Shaun
That's the purpose of a filter!
But there ist still the problem of tricking the content translation module for the "sub-language".
A filter syntax could be: [sub|en:word-en|us:word-us]. This should display word-en if English is required and word-us if US-English is required.
The only way I can think of is with different subdomains and same language code, e.g. en.example.com/en vs us.example.com/en. Content translation module evaluates the language code (/en) to show the right node and the filter evaluates the subdomain (en. or us.) to show the filtered values. I think, to write such a module is not a big deal. Perhaps you can use http://drupal.org/project/customfilter or any other module for creating custom filters.
..........
Wilfried
Drupal: a CMS without typo in its name