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

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

Serving Software Downloads in 956 Categories, Downloaded 50.286.418 Times

Locale::KeyedText 1.73.0

  Date Added: March 14, 2010  |  Visits: 823

Locale::KeyedText

Report Broken Link
Printer Friendly Version


Product Homepage
Download (89 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
USER REVIEWS
More Reviews or Write Review


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  -  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  -  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  -  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  
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  -  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  
Programming  -  Perl Module Manager 1.2.0.18
Perl Module Manager helps you to install, un-install and manage Perl modules from a CPAN site and other sources in an easy and intuitive way. Allows you to search through thousands of useful modules and libraries on a CPAN site and its mirrors....
1.44 MB  
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  
Libraries  -  Scrape::USPS::ZipLookup Perl Module 2.4
The United States Postal Service (USPS) has on its web site an HTML form at http://www.usps.com/zip4/ for standardizing an address. Given a firm, urbanization, street address, city, state, and zip, it will put the address into standard form...
11.26 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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