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

Hi Monks...

I need some advice regarding a program I'm writing, Basically it works in the following manner... I've writen a "loader" that loads a module that does something eg: manage users... the language for the entire program is contained in one big language file

here's a sample of my lang file -------------------
%lang = ( 'ICS::Users' = { buttons => ['create','update','delete'] }, 'ICS::Stats' = { buttons => ['read','refresh','query'] } )


So when I use ICS/Users.pm it will load $lang{'ICS::User'}, is it better to store the language in one file or a seperate file for each module

Thanx

Replies are listed 'Best First'.
Re: Some Advice Please
by ysth (Canon) on Jan 30, 2006 at 11:59 UTC
    I think the answer is "whatever you will find easiest to maintain."
Re: Some Advice Please
by kulls (Hermit) on Jan 30, 2006 at 10:12 UTC

    Do you need multi-language support in your script or application?
    As i have seen in many CMS applications (Content Management System), they are maintained a configuration file for each language . It (config file )should be loaded based on the user country.
    let me know your thoughts and views.
    -kulls
Re: Some Advice Please
by blazar (Canon) on Jan 31, 2006 at 08:20 UTC

    In addition to what others already wrote, since your "language file" is "big", you may consider some alternative to Perl source code for it. For example you may use a module like Storable to serialize your language specific data.

A reply falls below the community's threshold of quality. You may see it by logging in.