AutoI18n For NextJs is a desktop application designed to handle the internationalization of Next.js projects with a single click. It supports integration with the next-intl
library, refactoring code structure, automatically parsing tags to generate internationalization JSON files, multilingual translation, editing existing JSON files, and incremental internationalization of code.
Manually integrating multilingual support is often time-consuming and prone to failure due to unfamiliarity with the usage or numerous details.
next-intl
library documentation to learn how to integrate it.Integrate next-intl
option, the tool automatically completes the integration, eliminating the need to learn additional APIs or configurations.When adding new tags, the manual process is cumbersome and error-prone. You need to manually find JSON files, create unique keys, copy content, update component code, and translate content for each language.
t
function.When adjusting interface text, manual copy-pasting and translating are error-prone, especially with large amounts of text.
next-intl
library with no encapsulation, ensuring safe and reliable usage.AutoI18n For NextJs uses nodejs
file reading libraries, babel
parsing libraries, and third-party translation APIs (such as Azure Translate, Google Translate, DeepL, etc.) to automate code and translation content processing.
After installation, the tool is ready to use with no additional setup required. Refer to the following sections for an overview and introduction to various features. Descriptions and functionalities may vary slightly due to updates, so please refer to the latest version of the application for the most accurate information.
First, select the root directory of the project. After selection, the tool will check if the project already has a configuration file.
Note:
Choose the default language based on the actual default language of the project. The default language is the language of the text included in the code; selecting incorrectly will lead to translation failures.
Note: The automatic detection feature is not used as the text may contain multiple languages, and manual selection is more accurate.
Select the languages needed according to the project requirements. Avoid selecting too many languages initially, as translation APIs have rate and text volume limits. Large text volumes might cause translation failures or rate limits. It is recommended to translate only one additional language initially and add more later.
Enter brand terms here; these terms will be skipped during translation to ensure brand consistency and accuracy.
If there are files whose access paths should not be changed to /eng/lib/foo but kept as /lib/foo, enter these folder names here. These folders will be skipped when moving folders during the initial integration of next-intl. The api
directory is ignored by default and does not need to be filled in.
Currently, there are three options:
Integration options are used for initial configuration and debugging of next-intl multilingual stages. No need to integrate again after normal use.
Note: Make sure to save or commit the code to avoid issues that cannot be rolled back.
Click the Submit button, and the tool will automatically process the configuration content. The first submission will generate a configuration file named "auto-i18n-config.json," declaring the multilingual configuration of the current project, which can be committed to version control systems.
After submission, the processing log will be displayed.
If an error occurs, follow the prompt to fix the issue if it can be resolved. If the error cannot be fixed or is suspected to be a tool issue, click Click Me, Feedback The Error
to submit the error to the developer. If logged in at http://autoi18n.dev, the error information and email will be automatically included; otherwise, manually enter your email and name before submitting.
Click to automatically open the browser and visit: http://localhost:3000.
You can select multiple content items to be re-translated by checking the boxes in front of the rows. Click “Confirm Selection or Edit” at the bottom of the interface to save temporarily.
Through the JSON editor, you can edit the default language JSON of the project:
During editing, you can perform the following operations:
After completing modifications, click “Confirm Selection or Edit” at the bottom of the interface to save temporarily. Only after submission will the changes be processed, and all changes or selected content will be automatically handled and translated when returning to the home page and submitting.
The FAQ section in the application describes common issues and solutions. It is recommended to browse this section before use.
The About section in the application includes current application information, version information, and other details. You can manually check for updates and find contact information and feedback options.
Copyright © 2024 AutoI18n | Kamjin. All rights reserved.