Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
angular-l10n
Advanced tools
An Angular library to translate messages, dates and numbers
This library is for localization of Angular 2+ apps written in TypeScript, ES6 or ES5. It allows, in addition to translation, to localize numbers and dates of your app, adding language code, country code, currency code, timezone and optionally script code, numbering system and calendar, through Internationalization API. It also implements the validation of numbers by locales.
Sample app built with Angular CLI & Material, and its source code.
Get the changelog by releases.
Feature | Angular Official | ngx-translate External library | angular-l10n External library |
---|---|---|---|
Messages | Html attributes, message IDs | directives, impure pipes | directives, pure pipes |
File formats | XLIFF, XMB/XTB | JSON | JSON |
No bootstrap (when language changes) | no | yes | yes |
Getting the translation in component class | not yet | yes | yes |
Numbers | pure pipes using CLDR | - | directives & pure pipes via Intl API |
Dates | pure pipes using CLDR | - | directives & pure pipes via Intl API |
Validation | - | - | numbers validation via Intl API |
You can add angular-l10n
to your project using npm
:
npm install angular-l10n --save
To install a pre-release package:
npm install --save angular-l10n@next
System.config({
map: {
'angular-l10n': 'node_modules/angular-l10n/bundles/angular-l10n.umd.js'
}
});
No need to set up anything, just import it in your code.
No need to set up anything, just import it in your code.
If you build apps in Angular using ES5, you can include the umd
bundle in your index.html
:
<script src="node_modules/angular-l10n/bundles/angular-l10n.umd.js"></script>
and use global ng.l10n
namespace.
This library is compatible with AoT compilation & Server Side Rendering. It also supports the strict
TypeScript compiler option.
Note that this library is for translation at runtime, and not for translation during the building process: so we recommend using the Angular i18n native solution for SSR.
MIT
FAQs
Angular library to translate texts, dates and numbers
The npm package angular-l10n receives a total of 4,647 weekly downloads. As such, angular-l10n popularity was classified as popular.
We found that angular-l10n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.