SiT! Bugs - SiT!
View Issue Details
0000206SiT!pluginspublic2008-11-04 20:392009-08-16 14:38
paulh 
ivan 
normalfeatureN/A
closedfixed 
 
3.503.50 
0000206: Mechanism to allow plugins to add i18n
Plugins needs to be able to add words to the i18n dictionary, we dont want to have to put all the words into the main dictionary
No tags attached.
Issue History
2008-11-04 20:39paulhNew Issue
2008-11-04 21:39kieranNote Added: 0000161
2008-11-06 22:34ivanNote Added: 0000170
2008-11-06 22:35ivanStatusnew => feedback
2008-11-29 23:32kieranTarget Version3.45 => 3.50
2008-12-03 17:36ivanNote Added: 0000253
2008-12-03 20:39paulhNote Added: 0000262
2008-12-10 16:50paulhStatusfeedback => assigned
2008-12-10 16:50paulhAssigned To => ivan
2009-05-15 16:14ivanNote Added: 0001070
2009-05-15 16:14ivanStatusassigned => resolved
2009-05-15 16:14ivanResolutionopen => fixed
2009-05-15 16:14ivanFixed in Version => Current SVN
2009-05-15 16:33ivanNote Added: 0001071
2009-08-16 13:17ivanFixed in VersionCurrent SVN => 3.50
2009-08-16 14:38ivanNote Added: 0001615
2009-08-16 14:38ivanStatusresolved => closed

Notes
(0000161)
kieran   
2008-11-04 21:39   
After a brief discussion on IRC, we're thinking that plugins can ship their own lang files and detect which language the user is using and use the appropriate one, that sounds reasonble?
(0000170)
ivan   
2008-11-06 22:34   
I can't see a use-case where a plugin would need to add a key to the i18n dictionary for that to be used by SIT. If it were a new key then SiT wouldn't know about it. If it's a key for another plugin to use, I think that's unnecessary, each plugin can just keep track of it's own strings.
(0000253)
ivan   
2008-12-03 17:36   
Paul,

Should this be closed now? it's marked for feedback.

Ivan
(0000262)
paulh   
2008-12-03 20:39   
Whilst I agree the i18n and strings should be in the plugin there needs to be a mechanism (I feel) in SiT! which loads the correct i18n words.

The benefits of this are:

* Standard way of storing/registering i18n words and transations
* Code not duplicated as its in core sit (rather than every plugin)
* i18n mechanism the same for all plugins

I'm not entirely sure how to do this but my thoughts are:

* Consistent variable for each plugin which defines which languages it supports and where the string files are and SiT includes them?
* Use plugin_{do,register} to register the i18n words for the plugins?

I want to avoid getting to a situation where we have 10 SiT plugins doing i18n in 10 different ways which makes it difficult/confusing for translators
(0001070)
ivan   
2009-05-15 16:14   
Added in svn trunk r5382. Plugins can have i18n files (e.g. plugins/myplugin/i18n/en-GB.inc.php) etc.
(0001071)
ivan   
2009-05-15 16:33   
Added some documentation for this http://sitracker.org/wiki/Creating_Plugins#Plugin_Internationalisation [^]
(0001615)
ivan   
2009-08-16 14:38   
Released in 3.50rc1