Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@xml-locales/cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xml-locales/cli

[![NPM](https://img.shields.io/npm/v/xml-locales.svg)](https://www.npmjs.com/package/xml-locales)

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

@xml-locales/cli

NPM

This is cli tool to work with localization files in xml.

Installation

npm install -g @xml-locales/cli
yarn global add @xml-locales/cli
pnpm add -g @xml-locales/cli

[!IMPORTANT] This package, which works with XML files, has one root node named resources. This root node has child nodes named string. For example:

<resources>
  <string name="key1">value1</string>
  <string name="key2">value2</string>
</resources> 

Or use without

npx @xml-locales/cli <command> [...args]

Commands

Add Command

The add command is used to add a new key(s)-value(s) pair to the XML localization file or files from directory.

xml-locales add --path path/to/file_or_directory --keys newKey --values newValue
FlagAliasDefaultDescription
--path-pprocess.cwd()The path to the XML localization file or directory where the key-value pair will be added.
--keys-kNoneThe new key(s) to be added.
--values-vNoneThe value(s) to be associated with the new key.

Remove Command

The remove command is used to remove a key(s)-value(s) pair from the XML localization file or files from directory.

xml-locales remove --path path/to/file_or_directory --keys keyToRemove --values valueToRemove
FlagAliasDefaultDescription
--path-pprocess.cwd()The path to the XML localization file or directory where the key-value pair will be removed.
--keys-kNoneRemoved string by the key(s).
--values-vNoneOr removed string by the value(s).

Update Command

The update command is used to update a key(s)-value(s) pair in the XML localization file or files from directory.

xml-locales update --path path/to/file_or_directory --old oldValue --new newValue
FlagAliasDefaultDescription
--path-pprocess.cwd()The path to the XML localization file or directory where the key-value pair will be updated.
--old-oNoneThe old key(s) or value(s) to be updated.
--new-nNoneThe new key(s) or value(s) to replace the old one.

Sort Command

The sort command is used to sort the keys in the XML localization file or directory in ascending or descending order.

xml-locales sort --path path/to/file_or_directory --direction asc_or_desc
FlagAliasDefaultDescription
--path-pprocess.cwd()The path to the XML localization file or directory where the keys will be sorted.
--direction-d'asc'The sort direction. Can be 'asc' for ascending order or 'desc' for descending order.

Convert Command

The convert command is used to convert the XML localization file or directory to JSON format.

xml-locales convert --path path/to/file_or_directory
FlagAliasDefaultDescription
--path-pprocess.cwd()The path to the XML localization file or directory where the file will be converted.

Packages

Packageversion
📦xml-localesNPM
💻@xml-locales/cliNPM

Keywords

xml-locales

FAQs

Package last updated on 25 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts