[ Index ]

PHP Cross Reference of GlotPress




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

GlotPress Format JSON class

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

Defines 1 class

GP_Format_JSON:: (4 methods):

Class: GP_Format_JSON  - X-Ref

Format class used to support JSON file format.

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

since: 2.3.0
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 JSON string.

read_originals_from_file( $file_name )   X-Ref
No description

read_translations_from_file( $file_name, $project = null )   X-Ref
Reads a set of translations from a JSON file.

since: 2.3.0
param: string     $file_name The name of the uploaded properties file.
param: GP_Project $project   Unused. The project object to read the translations into.
return: Translations|bool The extracted translations on success, false on failure.

decode_json_file( $file_name )   X-Ref
Loads a given JSON file and decodes its content.

since: 2.3.0
param: string $file_name The name of the JSON file to parse.
return: array|false The encoded value or false on failure.

Generated: Tue Jun 15 01:01:59 2021 Cross-referenced by PHPXref 0.7.1