[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
I18N: WP_Translation_File class.
File Size: | 312 lines (6 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct( string $file ) X-Ref |
Constructor. param: string $file File to load. |
create( string $file, ?string $filetype = null ) X-Ref |
Creates a new WP_Translation_File instance for a given file. return: false|WP_Translation_File param: string $file File name. param: string|null $filetype Optional. File type. Default inferred from file name. |
transform( string $file, string $filetype ) X-Ref |
Creates a new WP_Translation_File instance for a given file. return: string|false Transformed translation file contents on success, false otherwise. param: string $file Source file name. param: string $filetype Desired target file type. |
headers() X-Ref |
Returns all headers. return: array<string, string> Headers. |
entries() X-Ref |
Returns all entries. return: array<string, string[]> Entries. |
error() X-Ref |
Returns the current error information. return: string|null Error message or null if no error. |
get_file() X-Ref |
Returns the file name. return: string File name. |
translate( string $text ) X-Ref |
Translates a given string. return: false|string Translation(s) on success, false otherwise. param: string $text String to translate. |
get_plural_form( int $number ) X-Ref |
Returns the plural form for a given number. return: int Plural form. param: int $number Count. |
get_plural_expression_from_header( string $header ) X-Ref |
Returns the plural forms expression as a tuple. return: string Plural forms expression. param: string $header Plural-Forms header string. |
make_plural_form_function( string $expression ) X-Ref |
Makes a function, which will return the right translation index, according to the plural forms header. return: callable(int $num): int Plural forms function. param: string $expression Plural form expression. |
import( WP_Translation_File $source ) X-Ref |
Imports translations from another file. return: bool True on success, false otherwise. param: WP_Translation_File $source Source file. |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |