This is the official typesafe-i18n plugin for inlang.
You can use this plugin to read and write resources that can be used in a project with typesafe-i18n
as the internationalization library.
It is not meant to be used together with the SDK inlang provides.
// filename: inlang.config.js
/**
* @type {import("@inlang/core/config").DefineConfig}
*/
export async function defineConfig(env) {
// initialize the plugin
const { default: typesafeI18nPlugin } = await env.$import(
"https://cdn.jsdelivr.net/gh/ivanhofer/inlang-plugin-typesafe-i18n@2/dist/index.js"
)
return {
plugins: [typesafeI18nPlugin()],
}
}
- namespaces are currently not supported in the
inlang
Editor - types don't get updated if you make changes to your
BaseTranslation
workaround: to update the types run the generator in CI after the Editor pushes new Messages to the repository