
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
@siemens/element-translate-ng
Advanced tools
element-translate-ng is a translation abstraction layer. It can be used with
ngx-translateSee here for details how it works and how to use it.
Install the library as follows:
npm install --save @siemens/element-translate-ng
An important part of the library is the extraction of translatable keys as a TypeScript interface as well as extracting a JSON messages file with default translations. The extraction happens on compiled files. I.e. make sure to run the build first. Then, to run these extractions
npx update-translatable-keys
By default, this will pick of the configuration from a file element-translate.conf.json. To
use a different config file, pass as the only argument to the command.
The config file looks like this
{
"files": "dist/@simpl/**/fesm2022/**/*.mjs",
"configs": [
{
"name": "element",
"locationPrefix": "projects/element-ng",
"keysFile": "projects/element-ng/translate/si-translatable-keys.interface.ts",
"keysInterfaceName": "SiTranslatableKeys",
"messagesFile": "dist/@siemens/element-ng/template-i18n.json"
}
]
}
files is a glob pattern for defining the files to scanconfigs is an array of configs. For mono-repos building multiple libraries, they can be
separated into different configs. All keys are required:
name is a unique namelocationsPrefix defines the path prefix of the source files, important to distinguish
between different libraries in a mono-repokeysFile defines the path of the generated TypeScript interfaces filekeysInterfaceName defines the name of the TypeScript interfacemessagesFile defines the path of the generated messages JSON fileRun yarn translate:test to perform the unit tests via Karma.
You can set a seed for running the tests in a specific using an environment variable: SEED=71384 yarn translate:test
The following applies for code and documentation of the git repository, unless explicitly mentioned.
Copyright (c) Siemens 2016 - 2025
MIT, see LICENSE.md.
FAQs
Element translation abstraction layer.
We found that @siemens/element-translate-ng demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

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.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.