Reported by Loïc d'Anterroches, Aug 10, 2008
I need to find a smart way to allow people to see and input the status/tags in their own language but store in the DB in English.
Comment 1 by Loïc d'Anterroches, Aug 12, 2008
Comment 2 by Patrick Georgi, Mar 1, 2009
The easiest implementation would be to compare the input with the _("...") versions of all strings, or create a lookup table. pseudocode: $status=array(); $status[_("status1")]="status1"; $status[_("status2")]="status2"; ... and then write $status[$inputvalue] to the DB. I guess the hard part of this is that the values are user-definable, and there you'll have the problem that custom values would require translation in the first place. But the concept would be the same, no matter if the translations come from gettext or the DB. Though, if the translations are in the DB, it might be possible to handle that in the INSERT/UPDATE queries with some clever sub-querying.
Comment 3 by Jean-Philippe Fleury, Oct 28, 2011
Description of status should be translated too. For example, when we enter a status, a popup window appears to list them: Type:Defect Report of a software defect Type:Enhancement Request for enhancement [...] The part "Report of a software defect" is not made translatable in the file http://projects.ceondo.com/p/indefero/source/tree/develop/src/IDF/For m/IssueTrackingConf.php#L51 : const init_predefined = 'Type:Defect = Report of a software defect Type:Enhancement = Request for enhancement [...]';