Format class used to support Android XML file format.
| since | 1.0.0 |
|---|---|
| package | GlotPress |
| inherited_from | \GP_Format |
get_file_extensions() : array
| since | 2.0.0 |
|---|
arraySupported file extensions.print_exported_file(\GP_Project $project, \GP_Locale $locale, \GP_Translation_Set $translation_set, \GP_Translation $entries) : string
| since | 1.0.0 |
|---|---|
| inherited_from | \GP_Format::print_exported_file() |
\GP_ProjectThe project the strings are being exported for, not used in this format but part of the scaffold of the parent object.
\GP_LocaleThe locale object the strings are being exported for, not used in this format but part of the scaffold of the parent object.
\GP_Translation_SetThe locale object the strings are being exported for. not used in this format but part of the scaffold of the parent object.
\GP_TranslationThe entries to export.
stringThe exported Android XML string.print_exported_file($project, $locale, $translation_set, $entries)
read_originals_from_file(string $file_name) : \Translations | boolean
| since | 1.0.0 |
|---|---|
| inherited_from | \GP_Format::read_originals_from_file() |
stringThe name of the uploaded Android XML file.
\TranslationsbooleanThe extracted originals on success, false on failure.read_originals_from_file($file_name)
read_translations_from_file($file_name, $project = null)
escape(string $string) : string
| since | 1.0.0 |
|---|
stringThe string to escape.
stringReturns the escaped string.get_language_code(\GP_Locale $locale) : string | false
| since | 2.1.0 |
|---|
\GP_LocaleThe locale object.
stringfalseReturns false if the locale object does not have any iso_639 language code, otherwise returns the shortest possible language code string.cmp_context(string $a, string $b) : integer
| since | 1.0.0 |
|---|
stringThe first string to compare.
stringThe second string to compare.
integerReturns the result of the comparison.extract_xliff_info(string $string) : array | boolean
| since | 1.0.0 |
|---|
stringThe string to process.
arraybooleanAn array containing the extracted information from the xliff tags (there may be multiple) on success, false on failure.generate_entry(\obj $string, string $context) : \obj
| since | 1.0.0 |
|---|
\objThe string entry object to use.
stringThe context string to use.
\objA translation entry object.line(string $string, integer $prepend_tabs = 0)
| since | 1.0.0 |
|---|
stringThe string to process.
integerThe number of tab characters to prepend to the output.
preserve_escaped_unicode(string $string) : string
| since | 3.0 |
|---|
stringThe string to process.
stringReturns the string with double-escaped Unicode sequences.string_arrays(\obj $entries)
| since | 1.0.0 |
|---|
\objThe entries to store.
unescape(string $string) : string
| since | 1.0.0 |
|---|
stringThe string to unescape.
stringReturns the unescaped string.$alt_extensions
array()$exported : string
''| since | 1.0.0 |
|---|
$extension : string
'xml'| since | 1.0.0 |
|---|---|
| inherited_from | \GP_Format::extension |
$extension
''$filename_pattern
'%s-%s'$name : string
'Android XML (.xml)'| since | 1.0.0 |
|---|---|
| inherited_from | \GP_Format::name |
$name
''