i18nHelpers
Internationalization (i18n) utility functions
📝 Syntax
i18nHelpers('convert', potFile, jsonFile)
i18nHelpers('merge', jsonFile1, jsonFile2)
i18nHelpers('sort', jsonFileA, jsonFileB)
📥 Input argument
potFile - String: Path to the source .po/.pot translation template file
jsonFile - String: Path to JSON translation file destination
jsonFile1 - String: Path to the source JSON translation file
jsonFile2 - String: Path to the destination JSON translation file
jsonFileA - String: Path to the source JSON file to sort
jsonFileB - String: Path to the sorted JSON file
📄 Description
i18nHelpers provides essential utility functions for managing internationalization files. The main functions include:
'convert': Converts a .po/.pot translation template file into JSON format for easier manipulation.
'merge': Merges two JSON translation files. The entries from
jsonFile1are added tojsonFile2, and entries exclusive tojsonFile2are removed.'sort': Sorts and organizes entries in a JSON translation file.
jsonFileAandjsonFileBmay refer to the same file if in-place sorting is desired.
This utility is intended for internal use and may be updated over time.
🔗 See also
🕔 History
1.10.0
Initial version
Last updated
Was this helpful?