translation infra that sparks joy

    Myelin seamlessly integrates localization into your development process, freeing you to prioritize building exceptional user experiences while minimizing time spent on translation tasks.

    Features

    Local First and Private

    Translation calls happen on your machine. We never send your data to third party APIs or any other external databases.

    Open Source

    Myelin is fully open source. You can read every single line of code on the GitHub repository.

    Free

    Myelin is free. Now and forever.

    Multi Model

    Myelin is flexible. You can choose from four different infrastructures: openai, deepseek, moonshot, and qwen.

    Bring Your Own Model

    With Myelin, you can bring your own model.

    First Class i18n Library Support

    next-intl, react-intl, react-i18next, etc. Myelin supports them all.

    Namespace Support

    Myelin supports both namespaced and non namespaced translation files out of the box

    Tutorial

    Create myelin.config.json

    Ensure that you have a 'myelin.config.json' configuration file located in the root of your project. Below is an example.

    myelin.config.json

    {
        "aiProvider": "deepseek",
        "aiModel": "deepseek-chat",
        "locale": {
            "location": "locales",
            "sourceLanguage": "en",
            "targetLanguages": [
                "es",
                "fr",
                "zh",
                "zh-TW",
                "en-US"
            ]
        }
    }

    Add AI Api Keys

    Next, go ahead and add `AI_API_KEY` in your `.env` file. This is needed to run perform translations

    .env

    AI_API_KEY=sk-proj-your-api-key

    Translate

    Next, on your terminal run:

    > npx myelin.dev@latest translate

    When you run this command, Myelin loads your source JSON files (e.g., locales/en/common.json), identifies any new or updated translation strings, produces translations for your specified target languages, and creates or updates the relevant target language JSON namespaced files (e.g., locales/fr/common.json, locales/es/common.json, locales/zh/common.json).