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.256.098 Times

Locale::TextDomain 1.16

  Date Added: June 16, 2010  |  Visits: 909

Locale::TextDomain

Report Broken Link
Printer Friendly Version


Product Homepage
Download (99 downloads)



Locale::TextDomain is a Perl Interface to Uniforum Message Translation. SYNOPSIS use Locale::TextDomain (my-package, @locale_dirs); use Locale::TextDomain qw (my-package); my $translated = __"Hello World!n"; my $alt = $__{"Hello World!n"}; my $alt2 = $__->{"Hello World!n"}; my @list = (N__"Hello", N__"World"); my @plurals = (N__ ("One world", "{num} worlds"), N__ ("1 file", "%d files")); my $question = __x ("Error reading file {file}: {err}", file => $file, err => $!); printf (__n ("one file read", "%d files read", $num_files), $num_files); print __nx ("one file read", "{num} files read", $num_files, num => $num_files); The module Locale::TextDomain(3pm) provides a high-level interface to Perl message translation. Textdomains When your request a translation for a given string, the system used in libintl-perl follows a standard strategy to find a suitable message catalog containing the translation: Unless you explicitely define a name for the message catalog, libintl-perl will assume that your catalog is called messages (unless you have changed the default value to something else via Locale::Messages(3pm), method textdomain()). You might think that his default strategy leaves room for optimization and you are right. It would be a lot smarter if multiple software packages, all with their individual message catalogs, could be installed on one system, and it should also be possible that third-party components of your software (like Perl modules) can load their message catalogs, too, without interfering with yours. The solution is clear, you have to assign a unique name to your message database, and you have to specify that name at run-time. That unique name is the so-called textdomain of your software package. The name is actually arbitrary but you should follow these best-practice guidelines to ensure maximum interoperability: File System Safety In practice, textdomains get mapped into file names, and you should therefore make sure that the textdomain you choose is a valid filename on every system that will run your software. Case-sensitivity Textdomains are always case-sensitive (i. e. Package and PACKAGE are not the same). However, since the message catalogs will be stored on file systems, that may or may not distinguish case when looking up file names, you should avoid potential conflicts here. Textdomain Should Match CPAN Name If your software is listed as a module on CPAN, you should simply choose the name on CPANS as your textdomain. The textdomain for libintl-perl is hence libintl-perl. But please replace all periods (.) in your package name with an underscore because ... Internet Domain Names as a Fallback ... if your software is not a module listed on CPAN, as a last resort you should use the Java(tm) package scheme, i. e. choose an internet domain that you are owner of (or ask the owner of an internet domain) and concatenate your preferred textdomain with the reversed internet domain. Example: Your company runs the web-site www.foobar.org and is the owner of the domain foobar.org. The textdomain for your companys software barfoos should hence be org.foobar.barfoos. If your software is likely to be installed in different versions on the same system, it is probably a good idea to append some version information to your textdomain. Other systems are less strict with the naming scheme for textdomains but the phenomena known as Perl is actually a plethora of small, specialized modules and it is probably wisest to postulate some namespace model in order to avoid chaos. Binding textdomains to directories Once the system knows the textdomain of the message that you want to get translated into the users language, it still has to find the correct message catalog. By default, libintl-perl will look up the string in the translation database found in the directories /usr/share/locale and /usr/local/share/locale (in that order). It is neither guaranteed that these directories exist on the target machine, nor can you be sure that the installation routine has write access to these locations. You can therefore instruct libintl-perl to search other directories prior to the default directories. Specifying a differnt search directory is called binding a textdomain to a directory. Locale::TextDomain extends the default strategy by a Perl specific approach. Unless told otherwise, it will look for a directory LocaleData in every component found in the standard include path @INC and check for a database containing the message for your textdomain there. Example: If the path /usr/lib/perl/5.8.0/site_perl is in your @INC, you can install your translation files in /usr/lib/perl/5.8.0/site_perl/LocaleData, and they will be found at run-time..

Requirements: No special requirements
Platforms: Linux
Keyword: Cpan File Hello World Internet Domain Libraries Localetextdomain Message Name Perl Perl Interface Perl Interface Uniforum Message Translation Software Textdomain
Users rating: 0/10

License: Freeware Size: 460.8 KB
USER REVIEWS
More Reviews or Write Review


LOCALE::TEXTDOMAIN RELATED
Utilities  -  Apache Hello World Benchmarks 1.04
Apache Hello World Benchmarks is a benchmarking tool that seeks to give a sense of Web application execution speed on various software platforms running under the Apache Web server. Benchmarks can vary greatly from system to system, so this tool...
37.89 KB  
Web Browser Tools  -  OpenDownload 1.0.0
OpenDownload is a Firefox extension that allows you to open any file from the internet into the OS assigned program. This is similar to IEs Open or Run file download functionality. NOTE: This does not support streaming. How it wors, is it...
16.38 KB  
Libraries  -  Regexp::Ignore 0.03
Regexp::Ignore is a Perl module that let us ignore unwanted parts, while parsing text. WARNING This is an alpha code. Really. It was written in the end of 2001. It is not yet checked much. The only reason I submit it to CPAN that early is to...
71.68 KB  
Libraries  -  IO::Pipe::Producer 1.5
IO::Pipe::Producer is a Perl module that provides two modules getSubroutineProducer and getSystemProducer. SYNOPSIS # Module which provides 2 methods: getSubroutineProducer # and getSystemProducer. They take a subroutine reference # (with...
6.14 KB  
Programming  -  Diesel File Generator 0.5
Diesel is a generic file generator that uses domain-specific model files and reusable cartridges to create directories of output files.
6.46 MB  
Libraries  -  PurpleWiki::InlineNode 0.94
PurpleWiki::InlineNode Perl module offers inline node object. SYNOPSIS use PurpleWiki::InlineNode; # Create node of type text and content Hello, world! my $inlineNode1 = PurpleWiki::InlineNode->new(type => text, content => Hello, world!);...
143.36 KB  
Libraries  -  GD::Graph::Polar 0.15
GD::Graph::Polar is a Perl module to make polar graph using GD package. SYNOPSIS use GD::Graph::Polar; my $obj=GD::Graph::Polar->new(size=>480, radius=>100); $obj->addPoint (50=>25); $obj->addPoint_rad (50=>3.1415); $obj->addGeoPoint...
47.1 KB  
Libraries  -  Search::FreeText 0.05
Search::FreeText is a free text indexing module for medium-to-large text corpuses. SYNOPSIS my $test = new Search::FreeText(-db => [DB_File, "stories.db"]); $text->open_index(); $text->clear_index(); $text->index_document(1, "Hello...
10.24 KB  
Libraries  -  MARC::XML 0.4
MARC::XML is a subclass of MARC.pm to provide XML support. SYNOPSIS use MARC::XML; #read in some MARC and output some XML $myobject = MARC::XML->new("marc.mrc","usmarc"); $myobject->output({file=>">marc.xml",format=>"xml"}); #read in...
51.2 KB  
Home & Leisure  -  DriveHQ FileManager 1.1
DriveHQ FileManager is a Windows Explorer-like desktop application that seamlessly integrates the web-based file storage and sharing system to users' local file system, making Internet file management as easy as managing the local file system....
3.05 MB  
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