Re: Freemarker and choice format message

Petr Pokorný <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <000b01c94983$51c024a0$f5406de0$@com>
I dont know if meesages comes from ResourceBundle
We call messages from spring macro - <#macro messageText code,
text>${springMacroRequestContext.getMessage(code, text)}</#macro>

And Im not sure if springMacroRequestContext has something with
ResourceBundle.

Petr from CZ, best regards to us

-----Original Message-----
From: Attila Szegedi [mailto:[email protected]] 
Sent: Tuesday, November 18, 2008 2:35 PM
To: FreeMarker-user
Subject: Re: [FreeMarker-user] Freemarker and choice format message

If your messages are coming from a ResourceBundle, then  
bundle("patternKey", arg1, arg2, arg3) will work automatically.

Attila.

--
home: http://www.szegedi.org
twitter: http://twitter.com/szegedi
weblog: http://constc.blogspot.com

On 2008.11.18., at 14:26, Petr Pokorný wrote:

> Yeah, we are looking at the page when your mail comes.
>
> We dont know how to integrate it.
> We see that ResourceBundleModel has this function -  
> bundle("patternKey",
> arg1, arg2, arg3)
> But we dont know how to call this function from template.
> If is need to configure Messages.format static method to some  
> context or if
> bundle method do this automaticaly.
> Or if is need to configure something else.
>
> Can you describe it?
> Im like in fog.
>
> Thanks for your time.
> Petr from CZ, best regards to us.
>
> -----Original Message-----
> From: Attila Szegedi [mailto:[email protected]]
> Sent: Tuesday, November 18, 2008 1:20 PM
> To: FreeMarker-user
> Subject: Re: [FreeMarker-user] Freemarker and choice format message
>
> FreeMarker provides you with a convenient localization-aware
> combination of a java.util.ResourceBundle and java.text.MessageFormat
> functionality -- read
<http://freemarker.org/docs/pgui_misc_beanwrapper.html
>
>> and search for "ResourceBundle".
>
> I think that might be what you need.
>
> Attila.
>
> --
> home: http://www.szegedi.org
> twitter: http://twitter.com/szegedi
> weblog: http://constc.blogspot.com
>
> On 2008.11.18., at 13:03, Petr wrote:
>
>>
>> Hi to all,
>> is possible to do in freemarker that I give some arguments to
>> message and
>> msg  do choice action?
>>
>> We have did in java that our Message can format this msg
>> {0, choice, 1#{0,number,integer} osoba|1<{0,number,integer}
>> osoby|4<{0,number,integer} osob}.
>>
>> And now we are thinking this put to freemarker. Wo dont know if
>> freemarker
>> has some own way to do this or it is possible to initialize and
>> assign to
>> our format methods to freemarker context.
>>
>> Anybody has some idea to resolve this?
>> Thanks for your time.
>>
>> Im sorry for my english and if I dont express my situation clearly,
>> pls ask
>> me for some things which maybe miss in text.
>>
>> Thanks Petr from CZ, best regards to us


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
 

__________ Informace od ESET Smart Security, verze databaze 3615 (20081115)
__________

Tuto zpravu proveril ESET Smart Security.

http://www.eset.cz
 
 

__________ Informace od ESET Smart Security, verze databaze 3615 (20081115)
__________

Tuto zpravu proveril ESET Smart Security.

http://www.eset.cz
 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.