
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
[](https://codeclimate.com/github/qlaffont/rosetty/maintainability) [](
Complete Intl/I18n solution for browser and node. Old Owner: @flexper
const { rosetty } = require('rosetty');
const r = rosetty(
{
en: {
dict: {
test: 'This is a test',
},
locale: 'en-GB',
},
},
'en'
);
console.log(r.t('test')); // This is a test
Options
Field Name | Type | Description |
---|---|---|
config | Record<string, Language> | Specify dictionary and locale to use for each lang |
defaultLang | string? | Specify default language to use (should be the same as config) |
translateFallback | boolean? | Return fallback if translation is not defined |
Return
Field Name | Type | Description |
---|---|---|
changeLang | (newLang: string) => void | Change current lang |
languages | string[] | List of languages who can be selected |
getCurrentLang | () => string | Return current lang |
t | (key: string, params?: Record<string, any>, dict?: Record<string, any>) => string OR undefined | Return translated text https://github.com/lukeed/rosetta#rosettatkey-params-lang. If dict is defined, he will use dict. |
displayNames | Documentation | Consistent translation of language, region and script display names |
listFormat | Documentation | Language-sensitive list formatting |
numberFormat | Documentation | Language-sensitive number formatting |
pluralRules | Documentation | Plural-sensitive formatting and plural-related language rules |
dateTimeFormat | Documentation | Language-sensitive date and time formatting |
relativeTimeFormat | Documentation | Language-sensitive relative time formatting |
collator | Documentation | Language-sensitive string comparison |
segmenter | Documentation | Language-sensitive text segmentation |
durationFormat | Documentation | Language-sensitive duration formatting (Experimental) |
The locale
field in the configuration should be a valid BCP 47 language tag (e.g., 'en-GB', 'fr', 'de-DE') or an Intl.Locale instance.
// Using string locale
const config = {
en: {
dict: {},
locale: 'en-GB'
}
};
// Using Intl.Locale
const config = {
en: {
dict: {},
locale: new Intl.Locale('en-GB')
}
};
To use this library, you maybe need to add polyfills as some features are still experimental.
To fix this :
This package use TSdx. Please check documentation to update this package.
FAQs
[](https://codeclimate.com/github/qlaffont/rosetty/maintainability) [](
The npm package rosetty receives a total of 3 weekly downloads. As such, rosetty popularity was classified as not popular.
We found that rosetty demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.