![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
multi-lingual support...by c (Hermit) |
on Jan 04, 2002 at 23:28 UTC ( #136353=perlmeditation: print w/replies, xml ) | Need Help?? |
a while back, i put together a little script with some serious help from some people i know. its gone through a lot of maturing since i posted it to the monastery. i think it still has a ways to go, however a good deal of people out there have written in appreciation of its existance. the funny thing is, most of them are outside of the english-speaking world. i'm working at putting in some basic multi-language support. its not much verbage, and i was hoping that some of the community of monks could lend a hand. my spanish is so/so and my french is mediocre. i'm trying for english/french/german/portuguese/spanish support. there is really no more than 70 words translation, so if you could take a minute to look at what i have below, i'd appreciate it. oh, there's some perl in there as well, which i dont think i'd mind hearing some comments on as well :-) The code below is how i am allowing users to select a language. i'm not sure if its the best manner, but i figured creating only one instance of a language hash is better than creating one for each language. For translation, I know some of the single word translations would be difficult without seeing how they are used in context. after the code, i'm including a full list of in context sentences...
Context "\nPancho requires some flags to be specified.\nPlease try running $0 --help\n\n" "\nCant open external file specified with --list.\nPlease check the path and ensure file exists.\n\n" "\nYou have not specified a node or list of nodes to act upon!\n\n" "\nYou have not specified an SNMP community.\n\n" "\nYou have not specified a tftp server.\n\n" "\nIn order to tftp a configuration to a remote device\nyou must indicate a specific filename using -f.\n\n" "\nYou cannot upload and download at the same time.\n\n" "\n This is Pancho version $rcs\n\n" "\nCant open file specified for logging.\nPlease check the path specified.\n\n" "\nThe following hosts could not be resolved: @failed\n\n" "\nCopying configurations to and from startup-config\nis not possible using the CatOS.\n\n" "\nCopying configurations to and from startup-config\nis not possible using deprecated mibs.\n\n" "\nSuccessfully copied config to $args->{h} from $tftpserver\n\n" "$format config <$filename> copied from $tftpserver to $args->{h} by $user\n" "\nSuccessfully copied config to nvram on $args->{h} from $tftpserver\n\n" "$format config <$filename> copied from $tftpserver to nvram on $args->{h} by $user\n" "\nSuccessfully copied config to $tftpserver from $args->{h}.\n\n" "$format config copied to $tftpserver from $args->{h} by $user\n" "\nSuccessfully copied config to $tftpserver from nvram on $args->{h}.\n\n" "$format config copied to $tftpserver from nvram on $args->{h} by $user\n" "\nSuccessfully wrote config to memory on $args->{h}.\n\n" "$format config copied to nvram on $args->{h} by $user\n" "\nSuccessfully initialized a reload of $args->{h}.\n\n" "$format initialization of reload on $args->{h} by $user\n" humbly -c
Back to
Meditations
|
|