Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URL like resource  RSS feed

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use a JEditPane to show some html files and for this I need urls.
If I follw the logic the URLs are also resources so I can store them in to a resource bundle.
Is this a good technique ?
ThanX.
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resource bundles are for internationalization and not applicable ot your situation (unless I misunderstand your question).
In my project, I have a HelpDialog that shows HTML help. These help pages are kept in the .jar and shown in my help dialog.
Does that help/make sense?
brian
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must agree with you the html files are packed in to a jar archive but ..
at run time all url's can be group in to a resource bundle(and access via).
So my question was if is a good technique to use (access) URLs via resource bundle ?This can be aslo an internationalization case because the html documents are for more then one language.
ThankX
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about rephrasing your question? What you are saying/asking isn't making much sense (to me anyway). What exactly are you trying to do/accomplish?
brian
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You 're right.I reformulate
I have some htlm files in 2(or more language) and I try to use(show) them in the same way ->from a resource bundle the I get the url using a key, the same key for all laguages.Using the locale & the resource bundle I show (ivariably) the right url.
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this will help you or not.....
I have internationalized HTML help in my Java app (MACCC - see link below). What I did is no matter what language the user is running in, if they choose help, the first page they get is the one that they get to choose which language they want the help in - it is just an HTML page with links to each of the different language help files. It's similar to what you are doing.
If you want to do it your way, you could prefix each HTML page with the 2 letter language string (like this: en_help.html, jp_help.html, etc.) then, when they choose help, you can figure out which page to show.
brian
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "trick" with the "links to each of the different language" seems to be a good idea
ThanX
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!