Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-localizer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-localizer - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

3

package.json
{
"name": "text-localizer",
"version": "0.1.1",
"version": "0.1.2",
"main": "lib/index.js",

@@ -22,2 +22,3 @@ "types": "lib/index.d.ts",

"git": {
"commitMessage": "chore: release text-localizer ${version}",
"tagName": "text-localizer/${version}"

@@ -24,0 +25,0 @@ },

@@ -5,2 +5,39 @@ <h1 align="center">

[**Tutorial can be found here.**](https://enzomanuelmangano.github.io/text-localizer/docs/basic-tutorial/js-ts/setup)
## Tutorial
[**Tutorial can be found here**](https://enzomanuelmangano.github.io/text-localizer/docs/basic-tutorial/js-ts/setup).
## Usage
```ts
import { TextLocalizer } from 'text-localizer';
import { fetchItTranslations } from './l10n/it';
(async () => {
const localizer = new TextLocalizer({
us: import('./l10n/us.json'),
uk: import('./l10n/uk'),
it: fetchItTranslations,
});
await localizer.setOptions({
language: 'uk',
});
const translations = localizer.translations;
console.log(translations.question); // "Which is your favourite cat?"
console.log(
localizer.formatTranslation(translations.help, { topic: 'Text Localizer' })
);
})();
```
## Contributing
See the [contributing guide](https://github.com/enzomanuelmangano/text-localizer/blob/main/CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc