[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/l10n/ -> class-wp-translations.php (summary)

I18N: WP_Translations class.

File Size: 152 lines (4 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Translations:: (5 methods):
  __construct()
  __get()
  make_entry()
  translate_plural()
  translate()


Class: WP_Translations  - X-Ref

Class WP_Translations.

__construct( WP_Translation_Controller $controller, string $textdomain = 'default' )   X-Ref
Constructor.

param: WP_Translation_Controller $controller I18N controller.
param: string                    $textdomain Optional. Text domain. Default 'default'.

__get( string $name )   X-Ref
Magic getter for backward compatibility.

return: mixed
param: string $name Property name.

make_entry( $original, $translations )   X-Ref
Builds a Translation_Entry from original string and translation strings.

return: Translation_Entry Entry instance.
param: string $original     Original string to translate from MO file. Might contain
param: string $translations Translation strings from MO file.

translate_plural( $singular, $plural, $count = 1, $context = '' )   X-Ref
Translates a plural string.

return: string|null Translation if it exists, or the unchanged singular string.
param: string|null $singular Singular string.
param: string|null $plural   Plural string.
param: int|float   $count    Count. Should be an integer, but some plugins pass floats.
param: string|null $context  Context.

translate( $singular, $context = '' )   X-Ref
Translates a singular string.

return: string|null Translation if it exists, or the unchanged singular string
param: string|null $singular Singular string.
param: string|null $context  Context.



Generated : Sun Apr 28 08:20:02 2024 Cross-referenced by PHPXref