In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
312 [In-Portal CMS] Localization feature request N/A 2009-09-21 03:30 2010-08-31 14:19
needs work 5.1.0  
0000312: Phrases with parameters
Currently phrases are pretty static text, so no variables comes in/out. I suggest we create tag named m_PhraseWithParams or something like this (don't place code inside m_Phrase tag tag for performance). Tag will accept unlimited number of parameters named like param1, param2, param3 and so on. Then tag will use "vsprintf" function on phrase translation to replace %s and %N$s instances to given parameter values.
Issue History
2010-08-31 14:19 alex version => 5.1.0
2010-01-12 11:33 alex Status active => needs work
2010-01-12 11:33 alex Target Version 5.1.0 => Icebox
2009-10-03 07:54 administrator Status needs work => active
2009-09-25 15:20 alex Note Added: 0000553
2009-09-25 15:20 alex Assigned To alex => Dmitry
2009-09-25 15:20 alex Status needs feedback => needs work
2009-09-21 11:26 Dmitry Note Added: 0000497
2009-09-21 11:26 Dmitry Assigned To => alex
2009-09-21 11:26 Dmitry Status active => needs feedback
2009-09-21 03:30 alex Target Version => 5.1.0
2009-09-21 03:30 alex New Issue

2009-09-21 11:26   
We need to open the discussion for this in Development Groups since so far I see no direct benefit in this approach, do you?
2009-09-25 15:20   
For now this is already implemented in some places, e.g. some validation error reporting phrases contain %s to be able place validation parameters into error message. These parameter substitution is really useful for custom projects especially for ones with languages using right-to-left writing style. For them variable parameter place inside phrase is changed depending on language, where phrase is translated.

Maybe this is not so high priority as other issues. For now I will implement it locally (in tag processors, that require such functionality, not in core module).