‘Dynamic’ Language Switching and Per-Session Persistence

Published
2008-04-07 03:45
Written by
To side-step the issue of users switching our demo installation to non-English languages and as a proof-of-concept for a possible future CiviCRM feature, we’ve implemented a ‘dynamic’ language switching – after logging in, check the demo’s dashboard (i.e., the ‘CiviCRM Home’ page) and look for the ‘Choose Language’ box in the top right. Currently the selector is crude but functional (in the future, we’d much rather implement is as a drop-down) – the list of languages is limited to these with at least 20% of string coverage and the selected language is remembered until the end of the user’s session (i.e., until CiviCRM logout). In the future, when implementing this feature ‘properly’, we’d like to have the following improvements: – the selector should turn into a self-submitting drop-down, – the list of available languages should be defined in the admin panel, – the chosen language should be stored outside of the current session, either as a ‘standalone’ cookie in the user’s browser or as a setting attached to their CiviCRM contact. Do feel free to share your thoughts about this feature in the comments! :)
Filed under

Comments

I would really like to use a feature like this on my CiviCRM/Drupal install. Any simple implementation would make my users very happy - the one on the demo site would already be very useful.

However, it would make life a lot easier for our users if CiviCRM respected the Drupal user's language preference setting and automatically defaulted to that.

Cheers,

Christian

Supporting a multi-lingual install will be part of 2.2

I've attached the diff that we use on the demo site to the blog post

lobo