gettext-fallback.lib.php File Reference

Fallback i18n utility functions. More...

Go to the source code of this file.

Functions

 gettext ($str)
 Lookup a string.
 _ ($str)
 Alias for gettext().
 ngettext ($str_singular, $str_plural, $number)
 Lookup a singular or plural string.
 textdomain ($domain)
 Sets the textdomain.
 bindtextdomain ($domain, $directory)
 Binds a textdomain to a directory.
 dgettext ($domain, $str)
 Lookup a string using a custom domain.
 dngettext ($domain, $str_singular, $str_plural, $number)
 Lookup a singular or plural string using a custom domain.


Detailed Description

Fallback i18n utility functions.

This file provides i18n utility functions that are used if gettext support was not available. The functions are do-nothing stubs that will only cause your application to not break directly!

Todo:
Provide a way to integrate php-gettext in here

Definition in file gettext-fallback.lib.php.


Function Documentation

gettext ( str  ) 

Lookup a string.

This method does nothing by default, it just returns the string passed to this function.

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$str The string to lookup.
Returns:
The translated string, or the original string if no translation was found.
See also:
_

Definition at line 55 of file gettext-fallback.lib.php.

_ ( str  ) 

Alias for gettext().

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$str The string to lookup.
Returns:
The translated string, or the original string if no translation was found.
See also:
gettext

Definition at line 76 of file gettext-fallback.lib.php.

ngettext ( str_singular,
str_plural,
number 
)

Lookup a singular or plural string.

The result depends on the number.

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$str_singular The string to lookup (singular).
$str_plural The string to lookup (plural).
$number The number.
See also:
gettext

Definition at line 99 of file gettext-fallback.lib.php.

textdomain ( domain  ) 

Sets the textdomain.

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$domain The textdomain to set

Definition at line 121 of file gettext-fallback.lib.php.

bindtextdomain ( domain,
directory 
)

Binds a textdomain to a directory.

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$domain The textdomain.
$directory The directory.

Definition at line 138 of file gettext-fallback.lib.php.

dgettext ( domain,
str 
)

Lookup a string using a custom domain.

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$domain The textdomain.
$str The string to lookup.
Returns:
The translated string.
See also:
gettext

dngettext

Definition at line 162 of file gettext-fallback.lib.php.

dngettext ( domain,
str_singular,
str_plural,
number 
)

Lookup a singular or plural string using a custom domain.

Note that this function should be provided by PHP to work, this is just a fallback do-nothing stub!

Parameters:
$domain The textdomain.
$str_singular The string to lookup (singular).
$str_plural The string to lookup.
$number The number.
Returns:
The translated string.
See also:
ngettext

dgettext

Definition at line 192 of file gettext-fallback.lib.php.


Generated on Sun Aug 2 22:54:37 2009 for Anewt by  doxygen 1.5.9