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
> This guide is for Next.js App Router apps only. Guides for other setups are coming soon (ETA April 2024).
@@ -166,23 +166,32 @@ export default async function RootLayout({
166
166
167
167
```
168
168
169
-
####Step 4. Run the Compiler
169
+
### Step 4. Run the compiler
170
170
171
171
```bash
172
172
# If you haven't already, authenticate with the Replexica platform
173
173
pnpm replexica auth
174
174
175
-
# Build the app
175
+
# Build the app, without translations
176
176
pnpm run build
177
177
178
178
# Fetch translations from the Replexica platform
179
179
pnpm replexica i18n
180
180
181
+
# Build the app again, to inject translations into the build output
182
+
pnpm run build
183
+
181
184
# Start the app
182
185
pnpm run start
183
186
```
184
187
185
-
#### Step 5 (Optional). Test the result
188
+
> [!TIP]
189
+
> `pnpm replexica i18n` must be run after every build, to fetch the latest translations from the Replexica platform. It must be run in CI/CD pipelines as well, right after the `build` step.
190
+
191
+
> [!NOTE]
192
+
> We know that running `pnpm replexica i18n` after every build and running the build twice can be a bit cumbersome. We're working on a solution to make this process more streamlined!
193
+
194
+
### Step 5 (Optional). Test the result
186
195
187
196
If you haven't yet implemented the language switcher on the UI, run the following code in the browser console to switch the language to Spanish:
> `pnpm replexica i18n` must be run after every build, to fetch the latest translations from the Replexica platform. It must be run in CI/CD pipelines as well, right after the `build` step.
0 commit comments