-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
domain:i18n 💬Things related to internationalizationThings related to internationalizationpriority:low 🏖️Low priority issueLow priority issuetype:enhancement 😃New feature or requestNew feature or request
Milestone
Description
Description
Implement localization support for the Tanam web application using the Next.js localization framework. The localization should use two-letter language locales as a prefix to URLs and should initially support English (en) and Indonesian (in).
Requirements
-
Locale Prefix for URLs
- URLs should include the locale as a prefix.
- Example:
- English:
https://example.com/en/some/path - Indonesian:
https://example.com/in/some/path
- English:
-
Supported Locales
- English (default)
- Indonesian
-
Translation of Sidebar Navigation
- Replace all presentation strings in the sidebar navigation with localized strings.
-
URL-Based Language Change
- Confirm that the language change works for the sidebar menu by changing the URL:
http://localhost:3000/enshould display the sidebar menu in English.http://localhost:3000/inshould display the sidebar menu in Indonesian.
- Confirm that the language change works for the sidebar menu by changing the URL:
Steps to Implement
-
Install Next.js Internationalized Routing
- Follow the Next.js i18n documentation to install and configure internationalized routing.
-
Configure
next.config.js
Add the supported locales and set the default locale from- Try to resolve/guess from request headers
- Fallback to default
en
-
Create Locale Files
Create JSON files for English and Indonesian translations. -
Test the Implementation
- Run the development server and navigate to the following URLs to ensure that the sidebar menu displays the correct language:
http://localhost:3000/enhttp://localhost:3000/in
- Run the development server and navigate to the following URLs to ensure that the sidebar menu displays the correct language:
Additional Notes
- Ensure to add more translations as needed for other parts of the application.
- Consider adding a language switcher to the UI for user convenience.
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
domain:i18n 💬Things related to internationalizationThings related to internationalizationpriority:low 🏖️Low priority issueLow priority issuetype:enhancement 😃New feature or requestNew feature or request
Type
Projects
Status
In progress