gatsby-theme-i18n
Version:
A Gatsby theme for providing internationalization support to your Gatsby site by taking in a configuration file and creating prefixed, enriched pages for each language.
17 lines (14 loc) • 335 B
JavaScript
import * as React from "react"
import { useLocalization } from "../hooks/use-localization"
export const LocalesList = () => {
const { config } = useLocalization()
return (
<ul>
{config.map((locale) => (
<li key={locale.code}>
{locale.localName} ({locale.name})
</li>
))}
</ul>
)
}