Padre::Locale::T(3pm)

Padre::Locale::T3pm

Provides _t for declaring translatable strings

Usage

  use Padre::Locale::T;
  
  my $string = _T('This is a test');

Overview

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 user.

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 dramatically.

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

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

Functions

"_T"

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 effect.

Releases

2 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8

From padre 1.00+dfsg-3 in Debian 8 (Jessie). Parsed by carta from the page's man source.