4 ms·
It is really, really hard to do i18n really well. Most developers think it is easy because they don't consider all the little details that you need to get right
by bjourne 9y ago
It is really, really hard to do i18n really well. Most developers think it is easy because they don't consider all the little details that you need to get right. It's everything from input fields using comma or period as the decimal separator, Sunday or Monday as the start of the week, to currencies, different line lengths, time formats and much more.
IMHO, unless you plan to support more than half a dozen locales, it is less work to do one website (or frontend) for each locale than it is to build one website that adapts to multiple locales.
Good enough i18n is much easier. Just keep all strings in an associative array: {("greet", "en") : "Hello", ("greet", "ru") : "Здравствуйте!"} then each time a message is to be printed, have a function that looks up the correct translation: i18n_lookup(string_key, language).