
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
npm install i18n-table
TranslationManager
and stylesimport TranslationManager from "i18n-table";
import "i18n-table/dist/index.css";
const translations = {
en: {
colors: {
red: "Red",
blue: "Blue",
green: "Green",
},
},
es: {
colors: {
red: "Rojo",
green: "Verde",
},
},
};
translations
object should have locales as keys and objects or nested objects as values.
[!IMPORTANT] The
locale
property have to match with locale used in the first step.
const locales = [
{ locale: "en", fullName: "English", localName: "English" },
{ locale: "es", fullName: "Spanish", localName: "Español" },
];
TranslationManager
on your pageexport const App = () => {
const onSave = (translation) => {
/* Handle saving translations - structure is the same as in the step 2. */
};
return <TranslationManager translations={translations} locales={locales} onSave={onSave} />;
};
If you want to write your own styles, copy /src/lib/styles.css
file to your project, modify it and import it instead of i18n-table/dist/index.css
You can also customize header translations.
const componentTranslations = {
save: t("save"),
search: t("search"),
select: t("select"),
translationKey: t("translationKey"),
};
export const App = () => {
const onLocaleChange = (locale) => i18n.setLocale(locale);
return (
<TranslationManager
{/* ... */}
componentTranslations={componentTranslations}
onLocaleChange={onLocaleChange}
/>
)
};
Like every package maintained by Vazco, i18n-table package is MIT licensed.
FAQs
A React component that helps organize and manage translations
The npm package i18n-table receives a total of 4 weekly downloads. As such, i18n-table popularity was classified as not popular.
We found that i18n-table 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.