Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
While I can understand the impulse that leads to an attempted quick and dirty solution, keeping different versions of the text near where they are used will lead to an unhealthy intertwining of internationalization and everything else in your program. So adding a new language means auditing the whole thing each time. Instead the people that I know have tackled internationalization are uniform in their belief that what you really want to do is create a separation of presentation and content.

The pattern that I have most often seen mentioned for doing this is called Model-View-Controller or MVC for short. You have a different view for each language you support.

Does this take more work and thought up front to implement? Yes. But as with any programming problem, unless you have factored out what needs to change, changing it will be a very hard task. And if you are going to create an international application, you won't just be asked to do it in English and French. Rather you will need to go do it in a lot of languages, and many of those will be added by people chosen more for their knowledge of those languages than for programming skill...


In reply to Re (tilly) 1: Perl Programs That Support Multiple (Human) Languages by tilly
in thread Perl Programs That Support Multiple (Human) Languages by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-23 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found