Socket
Socket
Sign inDemoInstall

@spryker/locale

Package Overview
Dependencies
21
Maintainers
7
Versions
88
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @spryker/locale

## I18N


Version published
Weekly downloads
3.7K
increased by0.79%
Maintainers
7
Install size
54.0 MB
Created
Weekly downloads
 

Readme

Source

locale

I18N

Any package may have it's own set of localization data.

Locale package will locate all such data by the following glob: libs/*/src/i18n/*.ts.

The file name must match the targeted locale name specified as folders in locales/*.

The file must export default interface called I18nLocaleDataPackage.

The name in each locale file must be specified and will be used to prefix all tokens with it via dot (.) - so later translations must reference it with this name prefixed. This is done for easier navigation of the source of translations.

For example:

  • If the file specifies that name is prefix
  • And if the file defined translation with token example
  • Then in the application to get this translation use token prefix.example

Bundling

Before the build phase all such locale files will be found in all packages and aggregated in single data files by a target language which later will be included in the specific locale NgModule via lazy-loading.


This library was generated with Nx.

Running unit tests

Run nx test locale to execute the unit tests.

FAQs

Last updated on 21 Mar 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc