Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
Padre::Locale::T(3)   User Contributed Perl Documentation  Padre::Locale::T(3)

       Padre::Locale::T	- Provides _T for declaring translatable strings

	 use Padre::Locale::T;

	 my $string = _T('This is a test');

       Padre uses a function called _T to declare strings which	should be
       translated by the translation team, but which should not	be immediately
       localised in memory.

       This is done primarily because the active language may change between
       when a string is	initially stored in memory and when it is show to a

       The reason we use _T is that most translation tools in the wild that
       scan the	code for a program detect the use of a C macro calls _T	that
       does immediate translation.

       By creating a null pass through function	called _T and the linguistic
       similarity of Perl to C,	we can take advantage of the way translation
       tools detect translatable strings while keeping the proper Wx::gettext
       function	for strings which do need to be	translated immediately.

       The _T function used to live in Padre::Util, but	as that	module
       gradually bloated it was	increasing the code of getting the _T function

       Padre::Locale::T	declares only this one function, and will only ever do

       Because of this,	it also	exports	by default (although you are still
       welcome to declare the import if	you wish.

       The "_T"	function is used for strings that you do not want to translate
       immediately, but	you will be translating	later (multiple	times).

       The only	reason this function needs to exist at all is so that the
       translation tools can identify the string it refers to as something
       that needs to be	translated.

       Functionally, this function is just a direct pass-through with no

       Copyright 2008-2013 The Padre development team as listed	in

       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

       The full	text of	the license can	be found in the	LICENSE	file included
       with this module.

perl v5.24.1			  2013-11-09		   Padre::Locale::T(3)


Want to link to this manual page? Use this URL:

home | help