DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Question Using Validator with Resource Bundles

    Hello,
    I am currently using the struts validator in my application, but i had to move from the i18n to a resource bundle for different translations in a database. I have all the text coming from the resource bundle and inserting into the many different pages, but i am having trouble linking the tags/keys for the bundle inside the Validator. all i get for a popup message on my screen is:

    ??????? en_US.Name ???????

    the en_US is the locale info, and the Name is the Tag/Key. If anyone has any ideas please let me know.

    When it was using i18n it was using the ApplcationResource file.

  2. #2
    Join Date
    Feb 2006
    Location
    Cologne - Germany
    Posts
    271
    ??????? en_US.Name ??????? says, that your default-properties file (myprops_en.properties or myprops.properties, en and defautl are the same) is missing a key "Name". Perhaps you use a localized properties file (myprops_de.properties) and this one is missing the same key. so the bundle would search for the same key in the default props and thus not find it.

  3. #3
    Join Date
    Apr 2006
    Posts
    2
    When i get the data for the resourcebundle i have 3 different java files to the bundles would be stored in, Labels_en_US, Labels_fr_FR, Labels"Default". I have done a check and i can display the message that i need in the regular jsp pages as bundle.Name. I do know that if i'm using the fr_FR file that the message changes to fr_FR.Name. I have been reading that in "validator_1_2.dtd" they added the bundle attrubute to it. does anyone know more about it, and if it would help???

Similar Threads

  1. Replies: 0
    Last Post: 10-17-2002, 11:51 AM
  2. HOWTO : add a resource file to a project
    By Andrew Connell in forum .NET
    Replies: 0
    Last Post: 02-23-2002, 09:26 AM
  3. Replies: 1
    Last Post: 01-28-2002, 06:15 AM
  4. resource dll
    By Michael Shutt in forum VB Classic
    Replies: 8
    Last Post: 04-11-2001, 06:11 AM
  5. how can i edit this file in VB resource editor
    By sreenee in forum VB Classic
    Replies: 2
    Last Post: 06-30-2000, 08:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links