You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-1Lines changed: 55 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,63 @@ Say goodbye to setup headaches and hello to consistent code quality. Elevate you
36
36
-**Prettier Plugin Tailwindcss**: Automatic sorting of tailwind classnames using the official prettier plugin.
37
37
-**Prettier Plugin Sort Imports**: Organize import declarations alphabetically within groups, which can help improve readability when working on larger projects.
38
38
-**Husky**: Ensure code quality and prevent bad commits with pre-commit hooks powered by Husky.
39
+
-**Internationalization (i18n)**: Built-in support for multiple languages using next-intl, making it easy to create multilingual applications with locale-specific routing and translations.
40
+
41
+
## Internationalization (i18n)
42
+
NextJsLaunchpad comes with built-in internationalization support using next-intl. This integration provides:
39
43
40
-
## Getting Started
44
+
- Route-based locale handling with `/[locale]/` directory structure
45
+
- Easy-to-use translation hooks with `useTranslations` in server and client components.
46
+
47
+
Translation files are located in:
48
+
```bash
49
+
content/
50
+
├── en.json
51
+
├── fr.json
52
+
└── [other-locales].json
53
+
```
54
+
#### How to add a new language support:
55
+
56
+
To add a new language, we have to add the language JSON file to the content directory, which is in the root directory, that is our first step.
57
+
58
+
After that, we have to add the newly added language to the locales array in the navigation.ts file. Below is the content of the navigation.ts file, where we need to add the newly added language to the locales array:
59
+
```bash
60
+
import {defineRouting} from 'next-intl/routing';
61
+
import {createNavigation} from 'next-intl/navigation';
62
+
63
+
export const routing = defineRouting({
64
+
// A list of all locales that are supported
65
+
locales: ['en', 'fr', 'newLanguage'], // Add the new language code here
"description": "Nous avons créé un modèle avec les outils essentiels et les meilleures pratiques pour que vous puissiez vous concentrer sur le développement de votre projet NextJS.",
5
+
"edit_prompt": "Modifier",
6
+
"edit_file": "app/page.tsx",
7
+
"edit_to_start": "pour commencer",
8
+
"tech_stack": {
9
+
"nextjs": {
10
+
"name": "Next JS",
11
+
"description": "Exploitez la puissance de Next.js pour des applications React rendues côté serveur"
12
+
},
13
+
"typescript": {
14
+
"name": "TypeScript",
15
+
"description": "Améliorez votre expérience de développement grâce au typage statique de TypeScript"
16
+
},
17
+
"tailwindcss": {
18
+
"name": "Tailwind CSS",
19
+
"description": "Créez rapidement des designs personnalisés avec l'approche utilitaire de Tailwind CSS"
20
+
},
21
+
"eslint": {
22
+
"name": "ESLint",
23
+
"description": "Appliquez des normes de qualité de code et détectez les erreurs tôt avec ESLint"
24
+
},
25
+
"prettier": {
26
+
"name": "Prettier",
27
+
"description": "Gardez votre code propre et cohérent avec le formatage automatique de Prettier"
28
+
},
29
+
"prettier_plugin_tailwindcss": {
30
+
"name": "Plugin Prettier Tailwindcss",
31
+
"description": "Tri automatique des classes Tailwind avec le plugin officiel Prettier"
32
+
},
33
+
"prettier_plugin_sort_imports": {
34
+
"name": "Plugin Prettier Tri des Imports",
35
+
"description": "Triez les imports par ordre alphabétique pour une meilleure lisibilité, en particulier dans les grands projets"
36
+
},
37
+
"husky": {
38
+
"name": "Husky",
39
+
"description": "Assurez la qualité du code et empêchez les mauvais commits avec les hooks pré-commit de Husky"
40
+
}
41
+
},
42
+
"footer_text": "Une initiative Open Source de CreoWis Technologies."
43
+
},
44
+
"NotFound": {
45
+
"404": "404",
46
+
"dosent_exist_text": "Oups! La page que vous cherchez n'existe pas.",
0 commit comments