[Solar-talk] Formatting locale strings

Paul M Jones pmjones at ciaweb.net
Fri Jun 8 07:33:00 PDT 2007


On Jun 7, 2007, at 7:32 PM, Andreas Ravnestad wrote:

> Rodrigo Moraes wrote:
>> On 6/7/07, Andreas Ravnestad wrote:
>>
>>> Is there a pretty way to add formatting to locale strings (without
>>> resorting to (s)printf)? Maybe the getText helper could support  
>>> string
>>> formatting some time in the distant future?
>>>
>>
>> Solar_Base::locale() now has a third parameter: $replace, which is an
>> array used to format the resulting locale string using vsprintf().
>> This is only in SVN, but it is pretty simple to implement even if you
>> don't want to adopt SVN. These are the classes you need, and I don't
>> remember of anything that could break code based on Solar 0.27.1 for
>> them:
>>
>> Solar_Base
>> Solar_Locale
>> Solar_View_Helper_GetText
>> Solar_View_Helper_GetTextRaw
>>
>> So I suggest you to use the SVN version of these classes instead.
>>
>
> Thanks alot Rodrigo! I'll see if I can get permission to use SVN-code
> and all will be well.

That's what I'm using in my day-job, maybe that will convince whoever  
needs convincing that SVN is good enough.


> And if I'm really lucky, Paul might be planning a release soon too :)

Yeah, that whole "one release a month thing" isn't working out as  
well as I thought it would. :-( Working at a startup kind of sucks  
away all your time.

Tell you what, I'll post a separate message in a little while and  
talk about a release process.  Thanks for your patience.  :-)



--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.  <http://solarphp.com>

Join the Solar community wiki!  <http://solarphp.org>

Savant: The simple, elegant, and powerful solution for
templates in PHP.  <http://phpsavant.com>




More information about the solar-talk mailing list