Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.071.961 Times

Locale::KeyedText 1.73.0

  Date Added: March 14, 2010  |  Visits: 646

Locale::KeyedText

Report Broken Link
Printer Friendly Version


Product Homepage
Download (70 downloads)

Locale::KeyedText is a Perl module that refers to user messages in programs by keys. It also describes the same-number versions of Locale::KeyedText::Message ("Message") and Locale::KeyedText::Translator ("Translator"). Note that the "Locale::KeyedText" package serves only as the name-sake representative for this whole file, which can be referenced as a unit by documentation or use statements or Perl archive indexes. Aside from use statements, you should never refer directly to "Locale::KeyedText" in your code; instead refer to other above-named packages in this file. SYNOPSIS use Locale::KeyedText; main(); sub main { # Create a translator. my $translator = Locale::KeyedText::Translator->new({ set_names => [MyLib::Lang::, MyApp::Lang::], # set package prefixes for localized app components member_names => [Eng, Fr, De, Esp], # set list of available languages in order of preference }); # This will print Enter 2 Numbers in the first of the four # languages that has a matching template available. print $translator->translate_message( Locale::KeyedText::Message->new({ msg_key => MYAPP_PROMPT }) ); # Read two numbers from the user. my ($first, $second) = ; # Print a statement giving the operands and their sum. MyLib->add_two( $first, $second, $translator ); } package MyLib; # module sub add_two { my (undef, $first, $second, $translator) = @_; my $sum = $first + $second; # This will print plus equals in # the first possible language. For example, if the user # inputs 3 and 4, it the output will be 3 plus 4 equals 7. print $translator->translate_message( Locale::KeyedText::Message->new({ msg_key => MYLIB_RESULT, msg_vars => { FIRST => $first, SECOND => $second, RESULT => $sum } }) ); } Many times during a programs operation, the program (or a package it uses) will need to display a message to the user, or generate a message to be shown to the user. Sometimes this is an error message of some kind, but it could also be a prompt or response message for interactive systems. If the program or any of its components are intended for widespread use then it needs to account for a variance of needs between its different users, such as their preferred language of communication, or their privileges regarding access to information details, or their technical skills. For example, a native French or Chinese speaker often prefers to communicate in those languages. Or, when viewing an error message, the applications developer should see more details than joe public would. Alternately, sometimes a program will raise a condition or error that, while resembling a message that would be shown to a user, is in fact meant to be interpreted by the machine itself and not any human user. In some situations, a shared program component may raise such a condition, and one application may handle it internally, while another one displays it to the user instead. Locale::KeyedText provides a simple but effective mechanism for applications and packages that empowers single binaries to support N locales or user types simultaneously, and that allows any end users to add support for new languages easily and without a recompile (such as by simply copying files), often even while the program is executing. Locale::KeyedText gives your application the maximum amount of control as to what the user sees; it never outputs anything by itself to the user, but rather returns its results for calling code to output as it sees fit. It also does not make direct use of environment variables, which can aid in portability. Practically speaking, Locale::KeyedText doesnt actually do a lot internally; it exists mainly to document a certain localization methodology in an easily accessable manner, such that would not be possible if its functionality was subsumed into a larger package that would otherwise use it. Hereafter, if any other package or application says that it uses Locale::KeyedText, that is a terse way of saying that it subscribes to the localization methodology that is described here, and hence provides these benefits to developers and users alike. For some practical examples of Locale::KeyedText in use, see the /examples directory of this distribution. Or, see my dependent CPAN packages whose problem domain is databases and/or SQL..

Requirements: No special requirements
Platforms: Linux
Keyword: First Keyedtext Libraries Localekeyedtext Message Mylib Package Perl Module Programming Programs Second User
Users rating: 0/10

License: Freeware Size: 35.84 KB
LOCALE::KEYEDTEXT RELATED
Libraries  -  ebXML::Message 0.03
ebXML::Message is a Perl module to encapsulate an ebMS message. SYNOPSIS use ebXML::Message; # create new message my $message = ebXML::Message->new ( CPAId => http://www.you.org/cpa/123456, Action => NewPurchaseOrder, MessageId => 12,...
14.34 KB  
Libraries  -  Debug::Message 1.00
Debug::Message is a Perl module that eases the use of debug print with level, indentation and color. SYNOPSIS use Debug::Message; use Log::Dispatch; use Log::Dispatch::Screen; my $dispatcher = Log::Dispatch->new; $dispatcher->add(...
4.1 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  NetPacket::ICMP 0.04
NetPacket::ICMP is a Perl module to assemble and disassemble ICMP (Internet Control Message Protocol) packets. SYNOPSIS use NetPacket::ICMP; $icmp_obj = NetPacket::ICMP->decode($raw_pkt); $icmp_pkt = NetPacket::ICMP->encode(); $icmp_data =...
11.26 KB  
Utilities  -  Locale::Memories 0.04
Locale::Memories is a Perl module for L10N Message Retrieval. SYNOPSIS my $lm = Locale::Memories->new(); $lm->load_index(path_to_index); $lm->index_msg($locale, $msg_id, $msg_str); $lm->translate_msg($locale, $msg_id); This module is...
23.55 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Test::TempDatabase 0.1
Test::TempDatabase is a Perl module for temporary database creation and destruction. SYNOPSIS use Test::TempDatabase; my $td = Test::TempDatabase->create(dbname => temp_db); my $dbh = $td->handle; ... some tests ... # Test::TempDatabase...
11.26 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Net::NIS::Listgroup 1.0.0
Net::NIS::Listgroup is a Perl module to list hosts/users in a netgroup group. SYNOPSIS use Listgroup; $array_ref_groups = listgroup(); $array_ref_groups = listgroups(); $array_ref_users_or_groups = listgroup({groupname});...
14.34 KB  
Libraries  -  perlfaq3 5.8.8
perlfaq3 Perl module contains programming tools. How do I do (anything)? Have you looked at CPAN (see perlfaq2)? The chances are that someone has already written a module that can solve your problem. Have you read the appropriate manpages?...
12.2 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB