-
I have monorepo (nx.dev) with next folder structure:
I want to separate my locales from each other (each app and each library should have it own locales). that hardcodes Possible usageI want to use this library, like For example, have separated typesafe-18n.app_one.json {
"$schema": "https://unpkg.com/typesafe-i18n@5.18.1/schema/typesafe-i18n.json",
"baseLocale": "en",
"adapter": "react",
"generateOnlyTypes": true,
"outputPath": "./apps/app_one/src/internal/locale"
} typesafe-18n.lib_three.json {
"$schema": "https://unpkg.com/typesafe-i18n@5.18.1/schema/typesafe-i18n.json",
"baseLocale": "en",
"adapter": "react",
"generateOnlyTypes": true,
"outputPath": "./libs/lib_three/src/internal/locale"
} and then call regeneration for each like: yarn typesafe-i18n -p typesafe-18n.app_one.json # generate locales inside apps/app_one
yarn typesafe-i18n -p typesafe-18n.lib_three.json # generate locales inside libs/lib_three Maybe I am wrong and should to do it in another way? But, unfortunately, unable to find it |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @whalemare It is currently not possible to specify a file path to read the config. Feel free to crete a PR if you have time. I would love to add that feature, but I currently don't have the resources to implement it. As a workaround you can create the config files in different folders, and set the "current working directory (cwd)" to that folder and then execute the cli. Or simply "cd" into that folder and execute it from there: |
Beta Was this translation helpful? Give feedback.
Hi @whalemare It is currently not possible to specify a file path to read the config. Feel free to crete a PR if you have time. I would love to add that feature, but I currently don't have the resources to implement it.
As a workaround you can create the config files in different folders, and set the "current working directory (cwd)" to that folder and then execute the cli. Or simply "cd" into that folder and execute it from there:
cd app_one && yarn typesafe-i18n