Language barriers have always been a major obstacle in the globalized world we live in. With businesses expanding overseas and people from different cultures interacting, the need for effective translation services has never been greater. However, traditional translation methods are often time-consuming, costly, and can still result in errors. That's where AI-Intl comes in
Say goodbye to the complexities of internationalization with our AI-powered CLI application. This cutting-edge technology automates the process of translating and adapting your website for different cultures and languages, saving you time and effort.
Please note that this project is currently under active development, so while it may not work 100% at this time, we are working diligently to improve it. Thank you for your patience and understanding.
-
Install ai-intl CLI:
npm install -g ai-intl
-
Retrieve your API key from OpenAI
If you haven't already, you'll have to create an account and set up billing.
-
Set the key so ai-intl can use it:
ai-intl config set OPENAI_KEY=<your token>
-
Generate the config file:
ai-intl generate
-
Customize your translations
Open ai-intl.config.json that the CLI generated for you and customize your translations.
-
Optional if you want to run ai-intl pre-commit set up the hook.
ai-intl hook install
If you are using husky add
npx ai-intl
to the pre-commit hook.
- CLI that generate for you translations on demand. Run
ai-intl translate
and it will translate the content for you. - If enabled, the pre-commit hook π will check for translation changes in your default locale and adapt all other translations for each pull request.
- When needed you can customize the prompt using
.md file
at the same level of your default translationi18n/locales βββ en β βββ common.json β βββ common.md # write here your custom prompt β βββ admin.json β βββ serp.json βββ it βββ fr
- If you are facing any issue, please feel free to open a GitHub issue.
After finishing development, translation of content becomes a breeze with AI to take care of it all. With the added convenience of instant checks for corner cases such as right-to-left language or long words, you can rest easy knowing that your content is being handled with efficiency and care, leaving you with more time to focus on other important tasks
Website that need to support multiple locales Startup that is building awesome products and you want to focus on things that matters Work on marketing materials You need localization of social media platforms You are running and e-commerce platform You want to add internalization for your software
β Building a website that supports multiple locales
β Focus on product opportunity and don't want to waste time dealing with json files
β Working on marketing materials
β Localizing social media platforms
β Running an e-commerce platform
β Adding internationalization to software
- Erik Olivero: @ekolivero