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 29.642.885 Times

Locale::TextDomain 1.16

  Date Added: June 16, 2010  |  Visits: 603


Report Broken Link
Printer Friendly Version

Product Homepage
Download (82 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 and is the owner of the domain 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
More Reviews or Write Review

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  
Lifestyle  -  Hello World App
Hello World App Self Descriptive! Isn't it? ;) Requirements: Windows Phone 8.1
1024 KB  
Games  -  Hello World Translate
How many languages can you identify? This is a twist on the quintessential first program, Hello World. The Hello World message is displayed in random languages which the user is asked to identify. I'll tell you how many were correct and how long...
1024 KB  
Libraries  -  File::Data 1.12
File::Data is a Perl module as a interface to file data. Wraps all the accessing of a file into a convenient set of calls for reading and writing data, including a simple regex interface. Note that the file needs to exist prior to using this...
13.31 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  
Entertainment  -  Hello to the World 1.1
The "Hello World" application makes it possible to broadcast your personal video message to the world. Say hello to the world in a short video (max 15 seconds) just to make other people feel good. If you want the world to say hello to you, turn...
512 KB  
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  
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, 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.11.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