GlotPress Format base class. It is supposed to be inherited.

package GlotPress
inherited_from \GP_Format

 Methods

Gets the list of supported file extensions.

get_file_extensions() : array
Inherited
since 2.0.0

Returns

arraySupported file extensions.

print_exported_file()

print_exported_file($project, $locale, $translation_set, $entries) 
inherited_from \GP_Format::print_exported_file()

Parameters

$project

$locale

$translation_set

$entries

print_exported_file()

print_exported_file($project, $locale, $translation_set, $entries) 
Inherited

Parameters

$project

$locale

$translation_set

$entries

read_originals_from_file()

read_originals_from_file($file_name) 
inherited_from \GP_Format::read_originals_from_file()

Parameters

$file_name

read_originals_from_file()

read_originals_from_file($file_name) 
Inherited

Parameters

$file_name

read_translations_from_file()

read_translations_from_file($file_name, $project = null
Inherited

Parameters

$file_name

$project

Create a string that represents the value for the "Language:" header for an export file.

get_language_code(\GP_Locale $locale) : string | false
Inherited
since 2.1.0

Parameters

$locale

\GP_Locale

The locale object.

Returns

stringfalseReturns false if the locale object does not have any iso_639 language code, otherwise returns the shortest possible language code string.

add_schema_declaration()

add_schema_declaration() 

add_schema_info()

add_schema_info() 

escape()

escape($string) 

Parameters

$string

line()

line($string, $prepend_tabs = 0

Parameters

$string

$prepend_tabs

res_header()

res_header($name, $value) 

Parameters

$name

$value

unescape()

unescape($string) 

Parameters

$string

 Properties

 

$alt_extensions

$alt_extensions 

Default

array('resx.xml')
inherited_from \GP_Format::alt_extensions
 

$alt_extensions

$alt_extensions 

Default

array()
 

$exported

$exported 

Default

''
 

$extension

$extension 

Default

'resx'
inherited_from \GP_Format::extension
 

$extension

$extension 

Default

''
 

$filename_pattern

$filename_pattern 

Default

'%s-%s'
 

$name

$name 

Default

'.NET Resource (.resx)'
inherited_from \GP_Format::name
 

$name

$name 

Default

''