
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.
@bricco/localization
Advanced tools
* Create a localization file, ie: /src/locales/sv/common.[json|js|ts]
Create a localization file, ie: /src/locales/sv/common.[json|js|ts]
Create /src/locales/translations.ts
import { initServerTranslations } from '@bricco/localization';
import { Common as CommonSV } from '@/locales/sv/common';
const dictionaries = {
en: {},
sv: CommonSV,
};
const { t, getLang } = initServerTranslations(dictionaries);
export { dictionaries, getLang, t };
import '@bricco/localization';
import { Common as CommonSV } from '@/locales/sv/common';
declare module '@bricco/localization' {
interface CustomOptions {
dictionary: typeof CommonSV;
}
}
import { Localization } from '@bricco/localization';
import { dictionaries } from '@/locales/translations';
...
export default async function RootLayout({ children }: { children: React.ReactNode }): Promise<JSX.Element> {
...
<body ...>
<Localization dictionaries={dictionaries}>
{children}
</Localization>
</body>
...
}
<AdminLayout
menu={menu}
languages={[
{ id: 'en', label: 'English' },
{ id: 'sv', label: 'Svenska' },
]}
title={'Example'}
subTitle="@bricco/next-utils"
>
{children}
</AdminLayout>
import { t } from '@/locales/translations';
import { useTranslation } from '@bricco/localization';
const { t } = useTranslation();
// Will fail to compile TS if "String in english" is missing from @/locales/sv/common.
console.log(t('String in english'))
FAQs
Unknown package
The npm package @bricco/localization receives a total of 0 weekly downloads. As such, @bricco/localization popularity was classified as not popular.
We found that @bricco/localization demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.