Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Questions about the Struts resource bundle

Reply
Thread Tools

Questions about the Struts resource bundle

 
 
William Cole
Guest
Posts: n/a
 
      03-02-2005
I am currently building a web application using the Struts framework.
I need to internationalize the site so I am putting all of the
localizable text into the resource bundle. The first question I have
is how can I add a multiple line key value pair? Some of my values in
the properties file are a paragraph long. My next question is about
colons. I am reading "Programming Jakarta Struts" from O'reilly (1st
edition I believe)and on page 294 they talk about how you can use
colons instead of the equal sign. Is there away to escape the colon so
that I could use colons in my value? For example
jsp.index.title=Project Name: Site Introduction

Any help would be appreciated.

</WRC>

 
Reply With Quote
 
 
 
 
Ryan Dillon
Guest
Posts: n/a
 
      03-03-2005
William Cole wrote:
> is how can I add a multiple line key value pair?


Put a "\" at the end of each partial line.

> Is there away to escape the colon so
> that I could use colons in my value? For example
> jsp.index.title=Project Name: Site Introduction
>


Escape them using "\", for example

jsp.index.titleroject Name\: Site Introduction


ResourceBundles load information using a Properties object,
so you can find all this information in the Javadoc for the
Properties.load() method.

--
Ryan Dillon
Code Canvas Technologies
Sign up for the RapidJ beta!
http://www.codecanvas.com.au/rapidj/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: AMD QUAD CORE Phenom bundle (Maplins bundle) won't let me installWinXP! Tony Computer Support 1 05-05-2009 08:47 PM
Re: AMD QUAD CORE Phenom bundle (Maplins bundle) won't let me install WinXP! Centre Parting Computer Support 0 05-05-2009 05:58 PM
Re: AMD QUAD CORE Phenom bundle (Maplins bundle) won't let me install WinXP! VanguardLH Computer Support 0 05-05-2009 04:52 PM
Re: AMD QUAD CORE Phenom bundle (Maplins bundle) won't let me install WinXP! Buffalo Computer Support 0 05-05-2009 04:16 PM
[Struts 1.1] : Load a particular resource bundle Dov MORYUSEF Java 2 03-29-2005 12:42 PM



Advertisments