Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 116463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:10:55+00:00 2026-05-11T03:10:55+00:00

I’m working on a web project that will (hopefully) be available in several languages

  • 0

I’m working on a web project that will (hopefully) be available in several languages one day (I say ‘hopefully’ because while we only have an English language site planned today, other products of my company are multilingual and I am hoping we are successful enough to need that too).

I understand that the best practice (I’m using Java, Spring MVC, and Velocity here) is to put all text that the user will see in external files, and refer to them in the UI files by name, such as:

#in messages_en.properties: welcome.header = Welcome to AppName!  #in the markup <title>#springMessage('welcome.header')</title> 

But, having never had to go through this process on a project myself before, I’m curious what the best way to deal with this is when you have some segments of the UI that are heavy on markup, such as:

<p>We are excited to announce that Company1 has been acquired by <a href='http://www.companydivisionx.com' class='boldLink'>Division X</a>, a fast-growing division of <a href='http://www.company2.com' class='boldLink'>Company 2</a>, Inc.  (Nasdaq: <a href='http://finance.google.com/finance?q=blah' class='boldLink'>BLAH</a>), based in... 

One option I can think of would be to store this ‘low-level’ of markup in messages.properties itself for the message – but this seems like the worst possible option.

Other options that I can think of are:

  • Store each non-markup inner fragment in messages.properties, such as acquisitionAnnounce1, acquisitionAnnounce2, acquisitionAnnounce3. This seems very tedious though.
  • Break this message into more reusable components, such as Company1.name, Company2.name, Company2.ticker, etc., as each of these is likely reused in many other messages. This would probably account for 80% of the words in this particular message.

Are there any best practices for dealing with internationalizing text that is heavy with markup such as this? Do you just have to bite down and bear the pain of breaking up every piece of text? What is the best solution from any projects you’ve personally dealt with?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:10:55+00:00Added an answer on May 11, 2026 at 3:10 am

    Typically if you use a template engine such as Sitemesh or Velocity you can manage these smaller HTML building blocks as subtemplates more effectively.

    By so doing, you can incrementally boil down the strings which are the purely internationalized ones into groups and make them relevant to those markup subtemplates. Having done this sort of work using templates for an app which spanned multi-languages in the same locale, as well as multiple locales, we never ever placed markup in our message bundles.

    I’d suggest that a key good practice would be to avoid placing markup (even at a low-level as you put it) inside message properties files at all costs! The potential this has for unleashing hell is not something to be overlooked – biting the bullet and breaking things up correctly, is far less of a pain than having to manage many files with scattered HTML markup. Its important you can visualise markup as holistic chunks and scattering that everywhere would make everyday development a chore since:

    • You would lose IDE color highlighting and syntax validation
    • High possibility that one locale file or another can easily be missed when changes to designs / markup filter down

    Breaking things down (to a realistic point, eg logical sentence structures but no finer) is somewhat hard work upfront but worth the effort.

    Regarding string breakdown granularity, here’s a sample of what we did:

        comment.atom-details=Subscribe To Comments     comment.username-mandatory=You must supply your name     comment.useremail-mandatory=You must supply your email address      comment.email.notification=Dear {0}, the comment thread you are watching has been updated.     comment.feed.title=Comments on {0}     comment.feed.title.default=Comments     comment.feed.entry.title=Comment on {0} at {1,date,medium} {2,time,HH:mm} by {3}       comment.atom-details=Suscribir a Comentarios     comment.username-mandatory=Debes indicar tu nombre     comment.useremail-mandatory=Debes indicar tu direcci\u00f3n de correo electr\u00f3nico     comment.email.notification=La conversaci\u00f3n que estas viendo ha sido actualizada     comment.feed.title=Comentarios sobre {0}     comment.feed.title.default=Comentarios     comment.feed.entry.title=Comentarios sobre {0} a {1,date,medium} {2,time,HH:mm} por {3} 

    So you can do interesting things with how you string replace in the message bundle which may also help you preserve it’s logical meaning but allow you to manipulate it mid sentence.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer mbeckish is right. Could you make a linear combination of… May 12, 2026 at 12:59 am
  • Editorial Team
    Editorial Team added an answer Assuming you named the linked server (your Active Directory OLE… May 12, 2026 at 12:59 am
  • Editorial Team
    Editorial Team added an answer If you use automatic versioning, you can convert the last… May 12, 2026 at 12:59 am

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.