ai-intl

2.0.1Β β€’Β PublicΒ β€’Β Published
AI Commits

AI-Intl

A CLI that manage your translations for you with AI πŸš€

Current version
Ai-intl - CLI that manage your translations for you πŸš€ | Product Hunt

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

What is all about?

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.

Setup

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.

  1. Install ai-intl CLI:

    npm install -g ai-intl
  2. Retrieve your API key from OpenAI

    If you haven't already, you'll have to create an account and set up billing.

  3. Set the key so ai-intl can use it:

    ai-intl config set OPENAI_KEY=<your token>
  4. Generate the config file:

    ai-intl generate

    ai-intl generate cli

  5. Customize your translations

    Open ai-intl.config.json that the CLI generated for you and customize your translations.

  6. 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.

How it works

  • 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 translation
    i18n/locales
    β”œβ”€β”€ en
    β”‚   β”œβ”€β”€ common.json
    β”‚   β”œβ”€β”€ common.md # write here your custom prompt
    β”‚   β”œβ”€β”€ admin.json
    β”‚   β”œβ”€β”€ serp.json
    β”œβ”€β”€ it
    β”œβ”€β”€ fr

Issues

  • If you are facing any issue, please feel free to open a GitHub issue.

Advantages

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

Use cases:

βœ… 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

Maintainers

Used by

Package Sidebar

Install

npm i ai-intl

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

15.4 kB

Total Files

4

Last publish

Collaborators

  • ekolivero