![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@solid-aria/i18n
Advanced tools
Primitives for dealing with locale and layout direction.
I18nProvider
- Provides the locale for the application to all child components.useLocale
- Returns the current locale and layout direction.npm install @solid-aria/i18n
# or
yarn add @solid-aria/i18n
# or
pnpm add @solid-aria/i18n
I18nProvider
I18nProvider
allows you to override the default locale as determined by the browser/system setting with a locale defined by your application (e.g. application setting). This should be done by wrapping your entire application in the provider, which will be cause all child elements to receive the new locale information via useLocale
.
import { I18nProvider } from "@solid-aria/i18n";
function App() {
return (
<I18nProvider locale="fr-FR">
<YourApp />
</I18nProvider>
);
}
useLocale
useLocale
allows components to access the current locale and interface layout direction. By default, this is automatically detected based on the browser or system language, but it can be overridden by using the I18nProvider
at the root of your app.
useLocale
should be used in the root of your app to define the lang and dir attributes so that the browser knows which language and direction the user interface should be rendered in.
import { useLocale } from "@solid-aria/i18n";
function App() {
const locale = useLocale();
return (
<div lang={locale().locale} dir={locale().direction}>
{/* your app here */}
</div>
);
}
All notable changes are described in the CHANGELOG.md file.
FAQs
Primitives for dealing with locale and layout direction.
The npm package @solid-aria/i18n receives a total of 677 weekly downloads. As such, @solid-aria/i18n popularity was classified as not popular.
We found that @solid-aria/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.