Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Are Message Catalogs Worth It?

by jffry (Hermit)
on Feb 20, 2006 at 17:09 UTC ( [id://531468]=perlquestion: print w/replies, xml ) Need Help??

jffry has asked for the wisdom of the Perl Monks concerning the following question:

This isn't a Perl-specific question, although I am asking about it for a Perl project. I find the expertise and pragmatism of folks on this site outweighs that found on comp.programming for obvious reasons (membership, ranking) and probably other reasons I don't know.

This is a medium-sized project. Not trivial by any means, but not (pardon the jargon) enterprise-class. There is a slight chance it might be used in India or China, as well as here in the U.S. However, let's assume all text output only needs to be in (US) English. In this case, is it worth the effort to have all messages in this command-line suite be separated out into a message catalog? Any benefits aside from easing translation?

FYI, my understanding of India is that everyone's native language is a regional mother-tongue, and that people speak English better than they do the national language (Hindi). Therefore, a Hindi message catalog would be of dubious value, anyway.

Replies are listed 'Best First'.
Re: Are Message Catalogs Worth It?
by philcrow (Priest) on Feb 20, 2006 at 17:47 UTC
    In my admittedly limited experience, there are other advantages to message catalogs. They not only allow easier multi-language solutions, and the potential for more complete docs. They make it easier to discuss the messages with the users. They also facilitate changing the messages. If the owning user wants to alter the text of a message, it can be changed in the catalog without changing the code. All of this is true even if you have only one language to support and you never get around to documenting the catalog.

    Phil

Re: Are Message Catalogs Worth It?
by dws (Chancellor) on Feb 20, 2006 at 17:57 UTC

    .. is it worth the effort to have all messages in this command-line suite be separated out into a message catalog?

    My experience in dealing with developers in India (i.e., with a very biased sample with respect to the entire population) is that English is a non-issue. I have no experience with working with developers in China (from, but not in).

    Extracting messages into a catalog isn't too big a deal. It's one of those problems you just throw time at. Getting those messages translated (and the translations checked), can be a large, long, frustrating undertaking, even for large enterprises that do it on an ongoing basis. You either have to impose early "language change" freezes so that translations can all be done at once, or you stagger releases as translations become available. Neither is fun.

    I'd run the question by your product manager. Not phrased as "should we do this?", which just invites a "Yes!", but phrased as "If we do this, it'll cost us X$ to do the message catalog, and Y$ (where Y might be "unknown, and we'll need outside help") to get the translations done. Where should that fit on the list of priorities?"

Re: Are Message Catalogs Worth It?
by BrowserUk (Patriarch) on Feb 20, 2006 at 19:13 UTC

    I'd say that it depends very much on where you are in the project and what time pressures exist on the current development. Also, how likely is the need?

    If you are at the beginning/design phase of the project, make finding/designing your i18n library he immediate priority, remembering that simple is best, and have your developers get used to specifying text in terms of message numbers and using the appropriate apis for outputting them etc., from the get go.

    If your project is well along, under time pressure or in the mintainance phase, realise that conversion to i18n is a major undertaking, and defer it for a major release. Fork your codebase and run the i18n refactor in parallel to the main thread with one senior developer and as many juniors as you can spare/get budget for. Only merge it back to your main thread once you have a good idea of what the effects and costs are going to be and how much change is going to be required.

    If the requirement is only speculative, still do the fork and put a senior developer in charge, but have him consentrate on costing the change rather than doing it, with a view to presenting the speculating management with some hard, profit/costs-based information upon which to base a decision.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Are Message Catalogs Worth It?
by pboin (Deacon) on Feb 20, 2006 at 17:39 UTC

    Not knowing too much about your specs, I'd lean towards "Yes, have a structured message system."

    For one, it's really not that difficult before-the-fact. It can be much more expensive to implement if you change your mind and do it later. Also, it should be much easier to standardize and control the message delivery, (formatting, tense, tone-of-speech, etc.).

    Finally, I think it would be easier to test. One of my pet peeves is when a project has the capability to issue messages that aren't to be found in the docs. If the messages are structured, you'll be able to more easily ensure that they're all documented correctly.

    I just can't really see much downside to doing it 'right'. Who ever regretted that?

Re: Are Message Catalogs Worth It?
by samtregar (Abbot) on Feb 20, 2006 at 18:25 UTC
    I suggest you back up and consider the more general problem - separating the interface to your program from the core logic. If you do a good job of that you may not have to resort to a message catalog right away (although that might still be a good idea, depending on how you rate the chances of an i18n project in your future).

    In the web world the most common way to separate interface from logic is via a model-view-controller architecture (MVC). You didn't give us enough information to guess whether that would be directly applicable to your app, but anything you can do to make your code interface-agnostic will help you when it comes time to make cosmetic changes, i18n changes included.

    -sam

Re: Are Message Catalogs Worth It?
by jZed (Prior) on Feb 20, 2006 at 17:48 UTC
    Separating text from formating and structure seems like it's always a good thing. As far as Hindi goes, true it's not universally spoken in India, but it is the primary language of >250 million people, only a fraction of whom also speak English.
      Well, I meant Indian computer geeks. The kind that have lectured me on both Linux kernel memory management and Iyengar Yoga. I didn't mean the street-sweeper Indians we learned about in social studies in high school.

      UPDATE: The truth is often not politically-correct.

Re: Are Message Catalogs Worth It?
by swampyankee (Parson) on Feb 20, 2006 at 17:58 UTC

    Since it may be used in China, I think it would be worthwhile to use the message catalogue, even if the only language required now is English.

    The learning experience may also be useful for a future project which will be required to be multi-lingual, too.

    emc

    " When in doubt, use brute force." — Ken Thompson

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://531468]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-19 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found