[ Index ]

PHP Cross Reference of GlotPress




/gp-includes/formats/ -> format-android.php (summary)

GlotPress Format Android XML class

File Size: 458 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GP_Format_Android:: (10 methods):

Class: GP_Format_Android  - X-Ref

Format class used to support Android XML file format.

print_exported_file( $project, $locale, $translation_set, $entries )   X-Ref
Generates a string the contains the $entries to export in the Android XML file format.

param: GP_Project         $project         The project the strings are being exported for, not used
param: GP_Locale          $locale          The locale object the strings are being exported for, not used
param: GP_Translation_Set $translation_set The locale object the strings are being
param: GP_Translation     $entries         The entries to export.
return: string The exported Android XML string.
since: 1.0.0

read_originals_from_file( $file_name )   X-Ref
Reads a set of original strings from an Android XML file.

param: string $file_name The name of the uploaded Android XML file.
return: Translations|bool The extracted originals on success, false on failure.
since: 1.0.0

generate_entry( $string, $context )   X-Ref
Generates a translation entry object to be added to the results for the "read_originals_from_file()" function.

param: obj    $string  The string entry objectto use.
param: string $context The context string to use.
return: obj A translation entry object.
since: 1.0.0

extract_xliff_info( $string )   X-Ref
Extracts the xliff information from a string.

param: string $string The string to process.
return: array|bool An array containing the extracted information from the xliff tags (there may be multiple) on success, false on failure.
since: 1.0.0

line( $string, $prepend_tabs = 0 )   X-Ref
Save a line to the exported class variable.  Supports prepending of tabs and appending
a newline to the string.

param: string $string       The string to process.
param: int    $prepend_tabs The number of tab characters to prepend to the output.
since: 1.0.0

string_arrays( $entries )   X-Ref
Output the strings array entries to the exported class variable.

param: obj $entries The entries to store.
since: 1.0.0

cmp_context( $a, $b )   X-Ref
Compare two context strings for a uasort callback.

param: string $a The first string to compare.
param: string $b The second string to compare.
return: int Returns the result of the comparison.
since: 1.0.0

preserve_escaped_unicode( $string )   X-Ref
Preserve a Unicode sequence (like \u1234) by adding another backslash.

param: string $string The string to process.
return: string Returns the string with double-escaped Unicode sequences.
since: 3.0

unescape( $string )   X-Ref
Unescapes a string with c style slashes.

param: string $string The string to unescape.
return: string Returns the unescaped string.
since: 1.0.0

escape( $string )   X-Ref
Escapes a string with c style slashes and html entities as required.

param: string $string The string to escape.
return: string Returns the escaped string.
since: 1.0.0

Generated: Sun Apr 5 01:01:48 2020 Cross-referenced by PHPXref 0.7.1