@intlayer/docs 7.5.10 → 7.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/blog/ar/intlayer_with_i18next.md +0 -2
  2. package/blog/ar/intlayer_with_next-i18next.md +0 -2
  3. package/blog/ar/intlayer_with_react-i18next.md +0 -2
  4. package/blog/de/intlayer_with_i18next.md +0 -45
  5. package/blog/de/intlayer_with_next-i18next.md +0 -46
  6. package/blog/de/intlayer_with_react-i18next.md +0 -2
  7. package/blog/en/intlayer_with_i18next.md +0 -46
  8. package/blog/en/intlayer_with_next-i18next.md +0 -48
  9. package/blog/en/intlayer_with_next-intl.md +0 -44
  10. package/blog/en/intlayer_with_react-i18next.md +0 -44
  11. package/blog/en/intlayer_with_react-intl.md +0 -42
  12. package/blog/en/intlayer_with_vue-i18n.md +0 -44
  13. package/blog/en-GB/intlayer_with_i18next.md +0 -45
  14. package/blog/en-GB/intlayer_with_next-i18next.md +0 -47
  15. package/blog/en-GB/intlayer_with_next-intl.md +0 -42
  16. package/blog/en-GB/intlayer_with_react-i18next.md +0 -43
  17. package/blog/en-GB/intlayer_with_react-intl.md +0 -42
  18. package/blog/en-GB/intlayer_with_vue-i18n.md +0 -46
  19. package/blog/es/intlayer_with_i18next.md +0 -45
  20. package/blog/es/intlayer_with_next-i18next.md +0 -47
  21. package/blog/es/intlayer_with_next-intl.md +0 -42
  22. package/blog/es/intlayer_with_react-i18next.md +0 -43
  23. package/blog/es/intlayer_with_react-intl.md +0 -42
  24. package/blog/es/intlayer_with_vue-i18n.md +0 -46
  25. package/blog/fr/intlayer_with_i18next.md +0 -45
  26. package/blog/fr/intlayer_with_next-i18next.md +0 -47
  27. package/blog/fr/intlayer_with_next-intl.md +0 -42
  28. package/blog/fr/intlayer_with_react-i18next.md +0 -43
  29. package/blog/fr/intlayer_with_react-intl.md +0 -42
  30. package/blog/fr/intlayer_with_vue-i18n.md +0 -46
  31. package/blog/hi/intlayer_with_i18next.md +0 -2
  32. package/blog/hi/intlayer_with_next-i18next.md +0 -2
  33. package/blog/hi/intlayer_with_react-i18next.md +0 -2
  34. package/blog/id/intlayer_with_i18next.md +0 -2
  35. package/blog/id/intlayer_with_next-i18next.md +0 -2
  36. package/blog/id/intlayer_with_react-i18next.md +0 -2
  37. package/blog/it/intlayer_with_i18next.md +0 -2
  38. package/blog/it/intlayer_with_next-i18next.md +0 -2
  39. package/blog/it/intlayer_with_react-i18next.md +0 -2
  40. package/blog/ja/intlayer_with_i18next.md +0 -45
  41. package/blog/ja/intlayer_with_next-i18next.md +0 -46
  42. package/blog/ja/intlayer_with_next-intl.md +0 -42
  43. package/blog/ja/intlayer_with_react-i18next.md +0 -42
  44. package/blog/ja/intlayer_with_react-intl.md +0 -42
  45. package/blog/ja/intlayer_with_vue-i18n.md +0 -46
  46. package/blog/ko/intlayer_with_i18next.md +0 -2
  47. package/blog/ko/intlayer_with_next-i18next.md +0 -2
  48. package/blog/ko/intlayer_with_react-i18next.md +0 -1
  49. package/blog/pl/intlayer_with_i18next.md +0 -45
  50. package/blog/pl/intlayer_with_next-i18next.md +0 -46
  51. package/blog/pl/intlayer_with_next-intl.md +0 -42
  52. package/blog/pl/intlayer_with_react-i18next.md +0 -43
  53. package/blog/pl/intlayer_with_react-intl.md +0 -42
  54. package/blog/pl/intlayer_with_vue-i18n.md +0 -46
  55. package/blog/pt/intlayer_with_i18next.md +0 -2
  56. package/blog/pt/intlayer_with_next-i18next.md +0 -2
  57. package/blog/pt/intlayer_with_react-i18next.md +0 -2
  58. package/blog/ru/intlayer_with_i18next.md +0 -45
  59. package/blog/ru/intlayer_with_next-i18next.md +0 -47
  60. package/blog/ru/intlayer_with_next-intl.md +0 -42
  61. package/blog/ru/intlayer_with_react-i18next.md +0 -43
  62. package/blog/ru/intlayer_with_react-intl.md +0 -42
  63. package/blog/ru/intlayer_with_vue-i18n.md +0 -46
  64. package/blog/tr/intlayer_with_i18next.md +0 -2
  65. package/blog/tr/intlayer_with_next-i18next.md +0 -1
  66. package/blog/tr/intlayer_with_react-i18next.md +0 -2
  67. package/blog/vi/intlayer_with_i18next.md +0 -2
  68. package/blog/vi/intlayer_with_next-i18next.md +0 -2
  69. package/blog/vi/intlayer_with_react-i18next.md +0 -2
  70. package/blog/zh/intlayer_with_i18next.md +0 -2
  71. package/blog/zh/intlayer_with_next-i18next.md +0 -2
  72. package/blog/zh/intlayer_with_react-i18next.md +0 -2
  73. package/blog/zh/intlayer_with_vue-i18n.md +0 -46
  74. package/dist/cjs/generated/blog.entry.cjs +58 -29
  75. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  76. package/dist/cjs/generated/docs.entry.cjs +254 -97
  77. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  78. package/dist/cjs/generated/frequentQuestions.entry.cjs +30 -15
  79. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  80. package/dist/cjs/generated/legal.entry.cjs +4 -2
  81. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  82. package/dist/esm/generated/blog.entry.mjs +58 -29
  83. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  84. package/dist/esm/generated/docs.entry.mjs +254 -97
  85. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  86. package/dist/esm/generated/frequentQuestions.entry.mjs +30 -15
  87. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  88. package/dist/esm/generated/legal.entry.mjs +4 -2
  89. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  90. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  91. package/dist/types/generated/docs.entry.d.ts +3 -0
  92. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  93. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  94. package/dist/types/generated/legal.entry.d.ts.map +1 -1
  95. package/docs/ar/cli/ci.md +137 -0
  96. package/docs/ar/cli/index.md +7 -1
  97. package/docs/ar/cli/list.md +39 -2
  98. package/docs/ar/cli/list_projects.md +131 -0
  99. package/docs/ar/intlayer_CMS.md +20 -0
  100. package/docs/ar/intlayer_with_next-i18next.md +0 -1
  101. package/docs/ar/intlayer_with_nextjs_14.md +28 -0
  102. package/docs/ar/intlayer_with_nextjs_15.md +28 -0
  103. package/docs/ar/intlayer_with_nextjs_16.md +28 -0
  104. package/docs/ar/intlayer_with_nextjs_no_locale_path.md +1159 -0
  105. package/docs/ar/plugins/sync-json.md +6 -2
  106. package/docs/de/cli/ci.md +137 -0
  107. package/docs/de/cli/index.md +7 -1
  108. package/docs/de/cli/list.md +39 -2
  109. package/docs/de/cli/list_projects.md +130 -0
  110. package/docs/de/intlayer_CMS.md +20 -0
  111. package/docs/de/intlayer_with_next-i18next.md +0 -1
  112. package/docs/de/intlayer_with_nextjs_14.md +28 -0
  113. package/docs/de/intlayer_with_nextjs_15.md +28 -0
  114. package/docs/de/intlayer_with_nextjs_16.md +28 -0
  115. package/docs/de/intlayer_with_nextjs_no_locale_path.md +1152 -0
  116. package/docs/de/plugins/sync-json.md +6 -2
  117. package/docs/en/cli/ci.md +137 -0
  118. package/docs/en/cli/index.md +14 -1
  119. package/docs/en/cli/list.md +39 -2
  120. package/docs/en/cli/list_projects.md +128 -0
  121. package/docs/en/interest_of_intlayer.md +1 -1
  122. package/docs/en/intlayer_CMS.md +20 -0
  123. package/docs/en/intlayer_with_next-i18next.md +0 -1
  124. package/docs/en/intlayer_with_nextjs_14.md +28 -0
  125. package/docs/en/intlayer_with_nextjs_15.md +28 -0
  126. package/docs/en/intlayer_with_nextjs_16.md +31 -1
  127. package/docs/en/intlayer_with_nextjs_no_locale_path.md +1132 -0
  128. package/docs/en/plugins/sync-json.md +6 -2
  129. package/docs/en-GB/cli/ci.md +137 -0
  130. package/docs/en-GB/cli/index.md +7 -1
  131. package/docs/en-GB/cli/list.md +39 -2
  132. package/docs/en-GB/cli/list_projects.md +130 -0
  133. package/docs/en-GB/intlayer_CMS.md +20 -0
  134. package/docs/en-GB/intlayer_with_next-i18next.md +0 -1
  135. package/docs/en-GB/intlayer_with_nextjs_14.md +28 -0
  136. package/docs/en-GB/intlayer_with_nextjs_15.md +28 -0
  137. package/docs/en-GB/intlayer_with_nextjs_16.md +28 -0
  138. package/docs/en-GB/intlayer_with_nextjs_no_locale_path.md +1154 -0
  139. package/docs/en-GB/plugins/sync-json.md +6 -2
  140. package/docs/es/cli/ci.md +137 -0
  141. package/docs/es/cli/index.md +7 -1
  142. package/docs/es/cli/list.md +39 -2
  143. package/docs/es/cli/list_projects.md +130 -0
  144. package/docs/es/intlayer_CMS.md +20 -0
  145. package/docs/es/intlayer_with_next-i18next.md +0 -1
  146. package/docs/es/intlayer_with_nextjs_14.md +28 -0
  147. package/docs/es/intlayer_with_nextjs_15.md +28 -0
  148. package/docs/es/intlayer_with_nextjs_16.md +28 -0
  149. package/docs/es/intlayer_with_nextjs_no_locale_path.md +1143 -0
  150. package/docs/es/plugins/sync-json.md +6 -2
  151. package/docs/fr/cli/ci.md +137 -0
  152. package/docs/fr/cli/index.md +7 -1
  153. package/docs/fr/cli/list.md +39 -2
  154. package/docs/fr/cli/list_projects.md +131 -0
  155. package/docs/fr/intlayer_CMS.md +20 -0
  156. package/docs/fr/intlayer_with_next-i18next.md +0 -1
  157. package/docs/fr/intlayer_with_nextjs_14.md +28 -0
  158. package/docs/fr/intlayer_with_nextjs_15.md +28 -0
  159. package/docs/fr/intlayer_with_nextjs_16.md +28 -0
  160. package/docs/fr/intlayer_with_nextjs_no_locale_path.md +1174 -0
  161. package/docs/fr/plugins/sync-json.md +9 -5
  162. package/docs/hi/cli/ci.md +137 -0
  163. package/docs/hi/cli/index.md +7 -1
  164. package/docs/hi/cli/list.md +38 -1
  165. package/docs/hi/cli/list_projects.md +130 -0
  166. package/docs/hi/intlayer_CMS.md +20 -0
  167. package/docs/hi/intlayer_with_next-i18next.md +0 -1
  168. package/docs/hi/intlayer_with_nextjs_14.md +28 -0
  169. package/docs/hi/intlayer_with_nextjs_15.md +28 -0
  170. package/docs/hi/intlayer_with_nextjs_16.md +28 -0
  171. package/docs/hi/intlayer_with_nextjs_no_locale_path.md +1151 -0
  172. package/docs/hi/plugins/sync-json.md +6 -2
  173. package/docs/id/cli/ci.md +137 -0
  174. package/docs/id/cli/index.md +7 -1
  175. package/docs/id/cli/list.md +38 -1
  176. package/docs/id/cli/list_projects.md +128 -0
  177. package/docs/id/intlayer_CMS.md +20 -0
  178. package/docs/id/intlayer_with_next-i18next.md +0 -1
  179. package/docs/id/intlayer_with_nextjs_14.md +28 -0
  180. package/docs/id/intlayer_with_nextjs_15.md +28 -0
  181. package/docs/id/intlayer_with_nextjs_16.md +28 -0
  182. package/docs/id/intlayer_with_nextjs_no_locale_path.md +1154 -0
  183. package/docs/id/plugins/sync-json.md +6 -2
  184. package/docs/it/cli/ci.md +137 -0
  185. package/docs/it/cli/index.md +7 -1
  186. package/docs/it/cli/list.md +39 -2
  187. package/docs/it/cli/list_projects.md +130 -0
  188. package/docs/it/intlayer_CMS.md +20 -0
  189. package/docs/it/intlayer_with_next-i18next.md +0 -1
  190. package/docs/it/intlayer_with_nextjs_14.md +28 -0
  191. package/docs/it/intlayer_with_nextjs_15.md +28 -0
  192. package/docs/it/intlayer_with_nextjs_16.md +28 -0
  193. package/docs/it/intlayer_with_nextjs_no_locale_path.md +1148 -0
  194. package/docs/it/plugins/sync-json.md +6 -2
  195. package/docs/ja/cli/ci.md +137 -0
  196. package/docs/ja/cli/index.md +7 -1
  197. package/docs/ja/cli/list.md +38 -1
  198. package/docs/ja/cli/list_projects.md +136 -0
  199. package/docs/ja/intlayer_CMS.md +20 -0
  200. package/docs/ja/intlayer_with_next-i18next.md +0 -1
  201. package/docs/ja/intlayer_with_nextjs_14.md +28 -0
  202. package/docs/ja/intlayer_with_nextjs_15.md +28 -0
  203. package/docs/ja/intlayer_with_nextjs_16.md +28 -0
  204. package/docs/ja/intlayer_with_nextjs_no_locale_path.md +1222 -0
  205. package/docs/ja/plugins/sync-json.md +6 -2
  206. package/docs/ko/cli/ci.md +137 -0
  207. package/docs/ko/cli/index.md +7 -1
  208. package/docs/ko/cli/list.md +38 -1
  209. package/docs/ko/cli/list_projects.md +128 -0
  210. package/docs/ko/intlayer_CMS.md +20 -0
  211. package/docs/ko/intlayer_with_next-i18next.md +0 -1
  212. package/docs/ko/intlayer_with_nextjs_14.md +28 -0
  213. package/docs/ko/intlayer_with_nextjs_15.md +28 -0
  214. package/docs/ko/intlayer_with_nextjs_16.md +28 -0
  215. package/docs/ko/intlayer_with_nextjs_no_locale_path.md +1205 -0
  216. package/docs/ko/plugins/sync-json.md +6 -2
  217. package/docs/pl/cli/ci.md +137 -0
  218. package/docs/pl/cli/index.md +7 -1
  219. package/docs/pl/cli/list.md +39 -2
  220. package/docs/pl/cli/list_projects.md +130 -0
  221. package/docs/pl/intlayer_CMS.md +20 -0
  222. package/docs/pl/intlayer_with_next-i18next.md +0 -1
  223. package/docs/pl/intlayer_with_nextjs_14.md +28 -0
  224. package/docs/pl/intlayer_with_nextjs_15.md +28 -0
  225. package/docs/pl/intlayer_with_nextjs_16.md +28 -0
  226. package/docs/pl/intlayer_with_nextjs_no_locale_path.md +1149 -0
  227. package/docs/pl/plugins/sync-json.md +6 -2
  228. package/docs/pt/cli/ci.md +137 -0
  229. package/docs/pt/cli/index.md +7 -1
  230. package/docs/pt/cli/list.md +39 -2
  231. package/docs/pt/cli/list_projects.md +134 -0
  232. package/docs/pt/intlayer_CMS.md +20 -0
  233. package/docs/pt/intlayer_with_next-i18next.md +0 -1
  234. package/docs/pt/intlayer_with_nextjs_14.md +28 -0
  235. package/docs/pt/intlayer_with_nextjs_15.md +28 -0
  236. package/docs/pt/intlayer_with_nextjs_16.md +28 -0
  237. package/docs/pt/intlayer_with_nextjs_no_locale_path.md +1152 -0
  238. package/docs/pt/plugins/sync-json.md +6 -2
  239. package/docs/ru/cli/ci.md +137 -0
  240. package/docs/ru/cli/index.md +7 -1
  241. package/docs/ru/cli/list.md +39 -2
  242. package/docs/ru/cli/list_projects.md +130 -0
  243. package/docs/ru/intlayer_CMS.md +20 -0
  244. package/docs/ru/intlayer_with_next-i18next.md +0 -1
  245. package/docs/ru/intlayer_with_nextjs_14.md +28 -0
  246. package/docs/ru/intlayer_with_nextjs_15.md +28 -0
  247. package/docs/ru/intlayer_with_nextjs_16.md +28 -0
  248. package/docs/ru/intlayer_with_nextjs_no_locale_path.md +1204 -0
  249. package/docs/ru/plugins/sync-json.md +6 -2
  250. package/docs/tr/cli/ci.md +137 -0
  251. package/docs/tr/cli/index.md +7 -1
  252. package/docs/tr/cli/list.md +39 -2
  253. package/docs/tr/cli/list_projects.md +134 -0
  254. package/docs/tr/intlayer_CMS.md +20 -0
  255. package/docs/tr/intlayer_with_next-i18next.md +0 -1
  256. package/docs/tr/intlayer_with_nextjs_14.md +28 -0
  257. package/docs/tr/intlayer_with_nextjs_15.md +28 -0
  258. package/docs/tr/intlayer_with_nextjs_16.md +28 -0
  259. package/docs/tr/intlayer_with_nextjs_no_locale_path.md +1159 -0
  260. package/docs/tr/plugins/sync-json.md +6 -2
  261. package/docs/uk/compiler.md +133 -0
  262. package/docs/uk/component_i18n.md +194 -0
  263. package/docs/uk/intlayer_with_nextjs_14.md +1646 -0
  264. package/docs/uk/intlayer_with_nextjs_15.md +1910 -0
  265. package/docs/uk/intlayer_with_nextjs_16.md +1763 -0
  266. package/docs/uk/intlayer_with_nextjs_no_locale_path.md +1159 -0
  267. package/docs/uk/intlayer_with_react_native+expo.md +715 -0
  268. package/docs/uk/packages/intlayer/getConfiguration.md +145 -0
  269. package/docs/uk/vs_code_extension.md +133 -0
  270. package/docs/vi/cli/ci.md +137 -0
  271. package/docs/vi/cli/index.md +7 -1
  272. package/docs/vi/cli/list.md +38 -1
  273. package/docs/vi/cli/list_projects.md +130 -0
  274. package/docs/vi/intlayer_CMS.md +20 -0
  275. package/docs/vi/intlayer_with_next-i18next.md +0 -1
  276. package/docs/vi/intlayer_with_nextjs_14.md +28 -0
  277. package/docs/vi/intlayer_with_nextjs_15.md +28 -0
  278. package/docs/vi/intlayer_with_nextjs_16.md +28 -0
  279. package/docs/vi/intlayer_with_nextjs_no_locale_path.md +1151 -0
  280. package/docs/vi/plugins/sync-json.md +6 -2
  281. package/docs/zh/cli/ci.md +137 -0
  282. package/docs/zh/cli/index.md +7 -1
  283. package/docs/zh/cli/list.md +38 -1
  284. package/docs/zh/cli/list_projects.md +130 -0
  285. package/docs/zh/intlayer_CMS.md +20 -0
  286. package/docs/zh/intlayer_with_next-i18next.md +0 -1
  287. package/docs/zh/intlayer_with_nextjs_14.md +28 -0
  288. package/docs/zh/intlayer_with_nextjs_15.md +28 -0
  289. package/docs/zh/intlayer_with_nextjs_16.md +28 -0
  290. package/docs/zh/intlayer_with_nextjs_no_locale_path.md +1206 -0
  291. package/docs/zh/plugins/sync-json.md +9 -5
  292. package/frequent_questions/ar/SSR_Next_no_[locale].md +1 -1
  293. package/frequent_questions/de/SSR_Next_no_[locale].md +1 -1
  294. package/frequent_questions/en/SSR_Next_no_[locale].md +1 -1
  295. package/frequent_questions/en-GB/SSR_Next_no_[locale].md +1 -1
  296. package/frequent_questions/es/SSR_Next_no_[locale].md +1 -1
  297. package/frequent_questions/fr/SSR_Next_no_[locale].md +1 -1
  298. package/frequent_questions/hi/SSR_Next_no_[locale].md +1 -1
  299. package/frequent_questions/id/SSR_Next_no_[locale].md +1 -1
  300. package/frequent_questions/it/SSR_Next_no_[locale].md +1 -1
  301. package/frequent_questions/ja/SSR_Next_no_[locale].md +1 -1
  302. package/frequent_questions/ko/SSR_Next_no_[locale].md +1 -1
  303. package/frequent_questions/pl/SSR_Next_no_[locale].md +1 -1
  304. package/frequent_questions/pt/SSR_Next_no_[locale].md +1 -1
  305. package/frequent_questions/ru/SSR_Next_no_[locale].md +1 -1
  306. package/frequent_questions/tr/SSR_Next_no_[locale].md +1 -1
  307. package/frequent_questions/vi/SSR_Next_no_[locale].md +1 -1
  308. package/frequent_questions/zh/SSR_Next_no_[locale].md +1 -1
  309. package/package.json +6 -6
  310. package/src/generated/blog.entry.ts +29 -0
  311. package/src/generated/docs.entry.ts +157 -0
  312. package/src/generated/frequentQuestions.entry.ts +15 -0
  313. package/src/generated/legal.entry.ts +2 -0
@@ -0,0 +1,1154 @@
1
+ ---
2
+ createdAt: 2026-01-10
3
+ updatedAt: 2026-01-10
4
+ title: Cara menerjemahkan aplikasi Next.js 16 Anda (tanpa [locale] di path halaman) – panduan i18n 2026
5
+ description: Pelajari cara membuat situs Next.js 16 Anda menjadi multibahasa tanpa [locale] di path halaman. Ikuti dokumentasi untuk melakukan internasionalisasi (i18n) dan menerjemahkannya.
6
+ keywords:
7
+ - Internasionalisasi
8
+ - Dokumentasi
9
+ - Intlayer
10
+ - Next.js 16
11
+ - JavaScript
12
+ - React
13
+ slugs:
14
+ - doc
15
+ - environment
16
+ - nextjs
17
+ - no-locale-path
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-next-no-lolale-path-template
19
+ youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
20
+ history:
21
+ - version: 1.0.0
22
+ date: 2026-01-10
23
+ changes: Rilis awal
24
+ ---
25
+
26
+ # Terjemahkan situs Next.js 16 Anda (tanpa [locale] di jalur halaman) menggunakan Intlayer | Internasionalisasi (i18n)
27
+
28
+ <Tab defaultTab="video">
29
+ <TabItem label="Video" value="video">
30
+
31
+ <iframe title="Solusi i18n terbaik untuk Next.js? Temukan Intlayer" class="m-auto aspect-16/9 w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/e_PPG7PTqGU?autoplay=0&amp;origin=http://intlayer.org&amp;controls=0&amp;rel=1"/>
32
+
33
+ </TabItem>
34
+ <TabItem label="Kode" value="code">
35
+
36
+ <iframe
37
+ src="https://stackblitz.com/github/aymericzip/intlayer-next-16-no-locale-path-template?embed=1&ctl=1&file=intlayer.config.ts"
38
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
39
+ title="Demo CodeSandbox - Cara menginternasionalisasi aplikasi Anda menggunakan Intlayer"
40
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
41
+ loading="lazy"
42
+ />
43
+
44
+ </TabItem>
45
+ </Tab>
46
+
47
+ Lihat [Templat Aplikasi](https://github.com/aymericzip/intlayer-next-no-lolale-path-template) di GitHub.
48
+
49
+ ## Daftar Isi
50
+
51
+ <TOC/>
52
+
53
+ ## Apa itu Intlayer?
54
+
55
+ **Intlayer** adalah library internasionalisasi (i18n) yang inovatif dan open-source, dirancang untuk menyederhanakan dukungan multi-bahasa dalam aplikasi web modern. Intlayer terintegrasi dengan mulus ke framework **Next.js 16** terbaru, termasuk **App Router** yang kuat. Library ini dioptimalkan untuk bekerja dengan **Server Components** agar rendering lebih efisien dan sepenuhnya kompatibel dengan [**Turbopack**](https://nextjs.org/docs/architecture/turbopack).
56
+
57
+ Dengan Intlayer, Anda dapat:
58
+
59
+ - **Mengelola terjemahan dengan mudah** menggunakan kamus deklaratif di tingkat komponen.
60
+ - **Melokalkan metadata, rute, dan konten secara dinamis**.
61
+ - **Mengakses terjemahan di komponen client-side dan server-side**.
62
+ - **Menjamin dukungan TypeScript** dengan tipe yang dihasilkan otomatis, meningkatkan autocompletion dan deteksi error.
63
+ - **Manfaatkan fitur canggih**, seperti deteksi locale dinamis dan pergantian bahasa.
64
+
65
+ > Intlayer kompatibel dengan Next.js 12, 13, 14, dan 16. Jika Anda menggunakan Next.js Page Router, Anda dapat merujuk ke [panduan ini](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/intlayer_with_nextjs_page_router.md). Untuk Next.js 12, 13, 14 dengan App Router, lihat [panduan ini](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/intlayer_with_nextjs_14.md).
66
+
67
+ ---
68
+
69
+ ## Panduan Langkah demi Langkah untuk Mengatur Intlayer di Aplikasi Next.js
70
+
71
+ ### Langkah 1: Instal Dependensi
72
+
73
+ Pasang paket yang diperlukan menggunakan npm:
74
+
75
+ ```bash packageManager="npm"
76
+ npm install intlayer next-intlayer
77
+ npx intlayer init
78
+ ```
79
+
80
+ ```bash packageManager="pnpm"
81
+ pnpm add intlayer next-intlayer
82
+ pnpm intlayer init
83
+ ```
84
+
85
+ ```bash packageManager="yarn"
86
+ yarn add intlayer next-intlayer
87
+ yarn intlayer init
88
+ ```
89
+
90
+ ```bash packageManager="bun"
91
+ bun add intlayer next-intlayer
92
+ bunx intlayer init
93
+ ```
94
+
95
+ - **intlayer**
96
+
97
+ Paket inti yang menyediakan alat internasionalisasi untuk manajemen konfigurasi, terjemahan, [deklarasi konten](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/content_file.md), transpilasi, dan [perintah CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/cli/index.md).
98
+
99
+ - **next-intlayer**
100
+
101
+ Paket yang mengintegrasikan Intlayer dengan Next.js. Paket ini menyediakan context providers dan hooks untuk internasionalisasi Next.js. Selain itu, paket ini menyertakan plugin Next.js untuk mengintegrasikan Intlayer dengan [Webpack](https://webpack.js.org/) atau [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack), serta proxy untuk mendeteksi locale pilihan pengguna, mengelola cookie, dan menangani pengalihan URL.
102
+
103
+ ### Langkah 2: Konfigurasikan Proyek Anda
104
+
105
+ Berikut adalah struktur akhir yang akan kita buat:
106
+
107
+ ```bash
108
+ .
109
+ ├── src
110
+ │ ├── app
111
+ │ │ ├── layout.tsx
112
+ │ │ ├── page.content.ts
113
+ │ │ └── page.tsx
114
+ │ ├── components
115
+ │ │ ├── clientComponentExample
116
+ │ │ │ ├── client-component-example.content.ts
117
+ │ │ │ └── ClientComponentExample.tsx
118
+ │ │ ├── localeSwitcher
119
+ │ │ │ ├── localeSwitcher.content.ts
120
+ │ │ │ └── LocaleSwitcher.tsx
121
+ │ │ └── serverComponentExample
122
+ │ │ ├── server-component-example.content.ts
123
+ │ │ └── ServerComponentExample.tsx
124
+ │ └── proxy.ts
125
+ ├── intlayer.config.ts
126
+ ├── next.config.ts
127
+ ├── package.json
128
+ └── tsconfig.json
129
+ ```
130
+
131
+ > Jika Anda tidak ingin routing locale, intlayer dapat digunakan sebagai provider / hook sederhana. Lihat [panduan ini](https://github.com/aymericzip/intlayer/blob/main/docs/docs/{{locale}}/intlayer_with_nextjs_no_locale_path.md) untuk detail lebih lanjut.
132
+
133
+ Buat file konfigurasi untuk mengatur bahasa aplikasi Anda:
134
+
135
+ ```typescript fileName="intlayer.config.ts" codeFormat="typescript"
136
+ import { Locales, type IntlayerConfig } from "intlayer";
137
+
138
+ const config: IntlayerConfig = {
139
+ internationalization: {
140
+ locales: [
141
+ Locales.ENGLISH,
142
+ Locales.FRENCH,
143
+ Locales.SPANISH,
144
+ // Lokal lainnya
145
+ ],
146
+ defaultLocale: Locales.ENGLISH,
147
+ },
148
+ routing: {
149
+ mode: "search-params", // atau `no-prefix` - Berguna untuk deteksi middleware
150
+ },
151
+ };
152
+
153
+ export default config;
154
+ ```
155
+
156
+ ```javascript fileName="intlayer.config.mjs" codeFormat="esm"
157
+ import { Locales } from "intlayer";
158
+
159
+ /** @type {import('intlayer').IntlayerConfig} */
160
+ const config = {
161
+ internationalization: {
162
+ locales: [
163
+ Locales.ENGLISH,
164
+ Locales.FRENCH,
165
+ Locales.SPANISH,
166
+ // Lokal lainnya
167
+ ],
168
+ defaultLocale: Locales.ENGLISH,
169
+ },
170
+ routing: {
171
+ mode: "search-params", // atau `no-prefix` - Berguna untuk deteksi middleware
172
+ },
173
+ };
174
+
175
+ export default config;
176
+ ```
177
+
178
+ ```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
179
+ const { Locales } = require("intlayer");
180
+
181
+ /** @type {import('intlayer').IntlayerConfig} */
182
+ const config = {
183
+ internationalization: {
184
+ locales: [
185
+ Locales.ENGLISH,
186
+ Locales.FRENCH,
187
+ Locales.SPANISH,
188
+ // Locales lain Anda
189
+ ],
190
+ defaultLocale: Locales.ENGLISH,
191
+ },
192
+ routing: {
193
+ mode: "search-params", // atau `no-prefix` - Berguna untuk deteksi middleware
194
+ },
195
+ };
196
+
197
+ module.exports = config;
198
+ ```
199
+
200
+ > Melalui berkas konfigurasi ini, Anda dapat mengatur URL terlokalisasi, pengalihan proxy, nama cookie, lokasi dan ekstensi deklarasi konten Anda, menonaktifkan log Intlayer di konsol, dan lainnya. Untuk daftar lengkap parameter yang tersedia, lihat [dokumentasi konfigurasi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/configuration.md).
201
+
202
+ ### Langkah 3: Integrasikan Intlayer ke Konfigurasi Next.js Anda
203
+
204
+ Konfigurasikan setup Next.js Anda untuk menggunakan Intlayer:
205
+
206
+ ```typescript fileName="next.config.ts" codeFormat="typescript"
207
+ import type { NextConfig } from "next";
208
+ import { withIntlayer } from "next-intlayer/server";
209
+
210
+ const nextConfig: NextConfig = {
211
+ /* opsi konfigurasi di sini */
212
+ };
213
+
214
+ export default withIntlayer(nextConfig);
215
+ ```
216
+
217
+ ```typescript fileName="next.config.mjs" codeFormat="esm"
218
+ import { withIntlayer } from "next-intlayer/server";
219
+
220
+ /** @type {import('next').NextConfig} */
221
+ const nextConfig = {
222
+ /* opsi konfigurasi di sini */
223
+ };
224
+
225
+ export default withIntlayer(nextConfig);
226
+ ```
227
+
228
+ ```typescript fileName="next.config.cjs" codeFormat="commonjs"
229
+ const { withIntlayer } = require("next-intlayer/server");
230
+
231
+ /** @type {import('next').NextConfig} */
232
+ const nextConfig = {
233
+ /* opsi konfigurasi di sini */
234
+ };
235
+
236
+ module.exports = withIntlayer(nextConfig);
237
+ ```
238
+
239
+ > Plugin Next.js `withIntlayer()` digunakan untuk mengintegrasikan Intlayer dengan Next.js. Plugin ini memastikan pembuatan file deklarasi konten dan memantau file-file tersebut dalam mode pengembangan. Plugin ini mendefinisikan variabel lingkungan Intlayer dalam lingkungan [Webpack](https://webpack.js.org/) atau [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack). Selain itu, plugin ini menyediakan alias untuk mengoptimalkan performa dan memastikan kompatibilitas dengan server components.
240
+
241
+ > Fungsi `withIntlayer()` adalah fungsi yang mengembalikan Promise. Fungsi ini memungkinkan mempersiapkan kamus intlayer sebelum proses build dimulai. Jika Anda ingin menggunakannya bersama plugin lain, Anda dapat melakukan await padanya. Contoh:
242
+ >
243
+ > ```ts
244
+ > const nextConfig = await withIntlayer(nextConfig);
245
+ > const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
246
+ >
247
+ > export default nextConfigWithOtherPlugins;
248
+ > ```
249
+ >
250
+ > Jika Anda ingin menggunakannya secara sinkron, Anda dapat menggunakan fungsi `withIntlayerSync()`. Contoh:
251
+ >
252
+ > ```ts
253
+ > const nextConfig = withIntlayerSync(nextConfig);
254
+ > const nextConfigWithOtherPlugins = withOtherPlugins(nextConfig);
255
+ >
256
+ > export default nextConfigWithOtherPlugins;
257
+ > ```
258
+ >
259
+ > Intlayer secara otomatis mendeteksi apakah proyek Anda menggunakan **webpack** atau **Turbopack** berdasarkan flag baris perintah `--webpack`, `--turbo`, atau `--turbopack`, serta **versi Next.js** Anda saat ini.
260
+ >
261
+ > Sejak `next>=16`, jika Anda menggunakan **Rspack**, Anda harus secara eksplisit memaksa Intlayer untuk menggunakan konfigurasi webpack dengan menonaktifkan Turbopack:
262
+ >
263
+ > ```ts
264
+ > withRspack(withIntlayer(nextConfig, { enableTurbopack: false }));
265
+ > ```
266
+
267
+ ### Langkah 4: Definisikan Rute Locale Dinamis
268
+
269
+ Hapus semua isi `RootLayout` dan ganti dengan kode berikut:
270
+
271
+ ```tsx {3} fileName="src/app/layout.tsx" codeFormat="typescript"
272
+ import type { Metadata } from "next";
273
+ import type { ReactNode } from "react";
274
+ import "./globals.css";
275
+ import { IntlayerClientProvider, LocalPromiseParams } from "next-intlayer";
276
+ import { getHTMLTextDir, getIntlayer } from "intlayer";
277
+ import { getLocale } from "next-intlayer/server";
278
+ export { generateStaticParams } from "next-intlayer";
279
+
280
+ export const generateMetadata = async ({
281
+ params,
282
+ }: LocalPromiseParams): Promise<Metadata> => {
283
+ const { locale } = await params;
284
+ const { title, description, keywords } = getIntlayer("metadata", locale);
285
+
286
+ return {
287
+ title,
288
+ description,
289
+ keywords,
290
+ };
291
+ };
292
+
293
+ const RootLayout = async ({
294
+ children,
295
+ }: Readonly<{
296
+ children: ReactNode;
297
+ }>) => {
298
+ const locale = await getLocale();
299
+
300
+ return (
301
+ <html lang={locale} dir={getHTMLTextDir(locale)}>
302
+ <IntlayerClientProvider defaultLocale={locale}>
303
+ <body>{children}</body>
304
+ </IntlayerClientProvider>
305
+ </html>
306
+ );
307
+ };
308
+
309
+ export default RootLayout;
310
+ ```
311
+
312
+ ```jsx {3} fileName="src/app/layout.mjx" codeFormat="esm"
313
+ import "./globals.css";
314
+ import { IntlayerClientProvider } from "next-intlayer";
315
+ import { getHTMLTextDir, getIntlayer } from "intlayer";
316
+ import { getLocale } from "next-intlayer/server";
317
+ export { generateStaticParams } from "next-intlayer";
318
+
319
+ export const generateMetadata = async ({ params }) => {
320
+ const { locale } = await params;
321
+ const { title, description, keywords } = getIntlayer("metadata", locale);
322
+
323
+ return {
324
+ title,
325
+ description,
326
+ keywords,
327
+ };
328
+ };
329
+
330
+ const RootLayout = async ({ children }) => {
331
+ const locale = await getLocale();
332
+
333
+ return (
334
+ <html lang={locale} dir={getHTMLTextDir(locale)}>
335
+ <IntlayerClientProvider defaultLocale={locale}>
336
+ <body>{children}</body>
337
+ </IntlayerClientProvider>
338
+ </html>
339
+ );
340
+ };
341
+
342
+ export default RootLayout;
343
+ ```
344
+
345
+ ```jsx {1,8} fileName="src/app/layout.csx" codeFormat="commonjs"
346
+ require("./globals.css");
347
+ const { IntlayerClientProvider } = require("next-intlayer");
348
+ const { getHTMLTextDir, getIntlayer } = require("intlayer");
349
+ const { getLocale } = require("next-intlayer/server");
350
+ const { generateStaticParams } = require("next-intlayer");
351
+
352
+ const generateMetadata = async ({ params }) => {
353
+ const { locale } = await params;
354
+ const { title, description, keywords } = getIntlayer("metadata", locale);
355
+
356
+ return {
357
+ title,
358
+ description,
359
+ keywords,
360
+ };
361
+ };
362
+
363
+ const RootLayout = async ({ children }) => {
364
+ const locale = await getLocale();
365
+
366
+ return (
367
+ <html lang={locale} dir={getHTMLTextDir(locale)}>
368
+ <IntlayerClientProvider defaultLocale={locale}>
369
+ <body>{children}</body>
370
+ </IntlayerClientProvider>
371
+ </html>
372
+ );
373
+ };
374
+
375
+ module.exports = {
376
+ default: RootLayout,
377
+ generateStaticParams,
378
+ generateMetadata,
379
+ };
380
+ ```
381
+
382
+ ### Langkah 5: Deklarasikan Konten Anda
383
+
384
+ Buat dan kelola deklarasi konten Anda untuk menyimpan terjemahan:
385
+
386
+ ```tsx fileName="src/app/metadata.content.ts" contentDeclarationFormat="typescript"
387
+ import { t, type Dictionary } from "intlayer";
388
+ import { Metadata } from "next";
389
+
390
+ const metadataContent = {
391
+ key: "metadata",
392
+ content: {
393
+ title: t({
394
+ id: "Judul Proyek Saya",
395
+ en: "My Project Title",
396
+ fr: "Le Titre de mon Projet",
397
+ es: "El Título de mi Proyecto",
398
+ }),
399
+
400
+ description: t({
401
+ id: "Temukan platform inovatif kami yang dirancang untuk menyederhanakan alur kerja Anda dan meningkatkan produktivitas.",
402
+ en: "Discover our innovative platform designed to streamline your workflow and boost productivity.",
403
+ fr: "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
404
+ es: "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad.",
405
+ }),
406
+
407
+ keywords: t({
408
+ id: ["inovasi", "produktivitas", "alur kerja", "SaaS"],
409
+ en: ["innovation", "productivity", "workflow", "SaaS"],
410
+ id: ["inovasi", "produktivitas", "alur kerja", "SaaS"],
411
+ fr: ["innovation", "productivité", "flux de travail", "SaaS"],
412
+ es: ["innovación", "productividad", "flujo de trabajo", "SaaS"],
413
+ }),
414
+ },
415
+ } as Dictionary<Metadata>;
416
+
417
+ export default metadataContent;
418
+ ```
419
+
420
+ ```tsx fileName="src/app/metadata.content.mjs" contentDeclarationFormat="typescript"
421
+ import { t, type Dictionary } from "intlayer";
422
+
423
+ /** @type {import('intlayer').Dictionary<import('next').Metadata>} */
424
+ const metadataContent = {
425
+ key: "metadata",
426
+ content: {
427
+ title: t({
428
+ id: "Judul Proyek Saya",
429
+ en: "My Project Title",
430
+ fr: "Le Titre de mon Projet",
431
+ es: "El Título de mi Proyecto",
432
+ }),
433
+
434
+ description: t({
435
+ en: "Discover our innovative platform designed to streamline your workflow and boost productivity.",
436
+ id: "Temukan platform inovatif kami yang dirancang untuk menyederhanakan alur kerja Anda dan meningkatkan produktivitas.",
437
+ fr: "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
438
+ es: "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad.",
439
+ }),
440
+
441
+ keywords: t({
442
+ id: ["inovasi", "produktivitas", "alur kerja", "SaaS"],
443
+ en: ["innovation", "productivity", "workflow", "SaaS"],
444
+ fr: ["innovation", "productivité", "flux de travail", "SaaS"],
445
+ es: ["innovación", "productividad", "flujo de trabajo", "SaaS"],
446
+ }),
447
+ },
448
+ };
449
+
450
+ export default metadataContent;
451
+ ```
452
+
453
+ ```javascript fileName="src/app/metadata.content.cjs" contentDeclarationFormat="commonjs"
454
+ const { t } = require("intlayer");
455
+
456
+ /** @type {import('intlayer').Dictionary<import('next').Metadata>} */
457
+ const metadataContent = {
458
+ key: "metadata",
459
+ content: {
460
+ title: t({
461
+ id: "Judul Proyek Saya",
462
+ en: "My Project Title",
463
+ fr: "Le Titre de mon Projet",
464
+ es: "El Título de mi Proyecto",
465
+ }),
466
+
467
+ description: t({
468
+ id: "Temukan platform inovatif kami yang dirancang untuk menyederhanakan alur kerja Anda dan meningkatkan produktivitas.",
469
+ en: "Discover our innovative platform designed to streamline your workflow and boost productivity.",
470
+ fr: "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
471
+ es: "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad.",
472
+ }),
473
+
474
+ keywords: t({
475
+ id: ["inovasi", "produktivitas", "alur kerja", "SaaS"],
476
+ en: ["innovation", "productivity", "workflow", "SaaS"],
477
+ fr: ["innovation", "productivité", "flux de travail", "SaaS"],
478
+ es: ["innovación", "productividad", "flujo de trabajo", "SaaS"],
479
+ }),
480
+ },
481
+ };
482
+
483
+ module.exports = metadataContent;
484
+ ```
485
+
486
+ ```json fileName="src/app/metadata.content.json" contentDeclarationFormat="json"
487
+ {
488
+ "key": "metadata",
489
+ "content": {
490
+ "title": {
491
+ "nodeType": "translation",
492
+ "translation": {
493
+ "id": "Judul Proyek Saya",
494
+ "en": "My Project Title",
495
+ "fr": "Le Titre de mon Projet",
496
+ "es": "El Título de mi Proyecto"
497
+ }
498
+ },
499
+ "description": {
500
+ "nodeType": "translation",
501
+ "translation": {
502
+ "id": "Temukan platform inovatif kami yang dirancang untuk menyederhanakan alur kerja Anda dan meningkatkan produktivitas.",
503
+ "en": "Discover our innovative platform designed to streamline your workflow and boost productivity.",
504
+ "fr": "Découvrez notre plateforme innovante conçue pour simplifier votre flux de travail et booster votre productivité.",
505
+ "es": "Descubra nuestra plataforma innovadora diseñada para simplificar su flujo de trabajo y aumentar su productividad."
506
+ }
507
+ },
508
+ "keywords": {
509
+ "nodeType": "translation",
510
+ "translation": {
511
+ "id": ["inovasi", "produktivitas", "alur kerja", "SaaS"],
512
+ "en": ["innovation", "productivity", "workflow", "SaaS"],
513
+ "fr": ["innovation", "productivité", "flux de travail", "SaaS"],
514
+ "es": ["innovación", "productividad", "flujo de trabajo", "SaaS"]
515
+ }
516
+ }
517
+ }
518
+ }
519
+ ```
520
+
521
+ ```tsx fileName="src/app/page.content.ts" contentDeclarationFormat="typescript"
522
+ import { t, type Dictionary } from "intlayer";
523
+
524
+ const pageContent = {
525
+ key: "page",
526
+ content: {
527
+ getStarted: {
528
+ main: t({
529
+ id: "Mulai dengan mengedit",
530
+ en: "Get started by editing",
531
+ fr: "Commencez par éditer",
532
+ es: "Comience por editar",
533
+ }),
534
+ pageLink: "src/app/page.tsx",
535
+ },
536
+ },
537
+ } satisfies Dictionary;
538
+
539
+ export default pageContent;
540
+ ```
541
+
542
+ ```javascript fileName="src/app/page.content.mjs" contentDeclarationFormat="esm"
543
+ import { t } from "intlayer";
544
+
545
+ /** Kumpulan konten halaman.
546
+ * @type {import('intlayer').Dictionary}
547
+ */
548
+ const pageContent = {
549
+ key: "page",
550
+ content: {
551
+ getStarted: {
552
+ main: t({
553
+ id: "Mulai dengan mengedit",
554
+ en: "Get started by editing",
555
+ fr: "Commencez par éditer",
556
+ es: "Comience por editar",
557
+ }),
558
+ pageLink: "src/app/page.tsx",
559
+ },
560
+ },
561
+ };
562
+
563
+ export default pageContent;
564
+ ```
565
+
566
+ ```javascript fileName="src/app/page.content.cjs" contentDeclarationFormat="commonjs"
567
+ const { t } = require("intlayer");
568
+
569
+ /** Kumpulan konten halaman.
570
+ * @type {import('intlayer').Dictionary}
571
+ */
572
+ const pageContent = {
573
+ key: "page",
574
+ content: {
575
+ getStarted: {
576
+ main: t({
577
+ id: "Mulai dengan mengedit",
578
+ en: "Get started by editing",
579
+ fr: "Commencez par éditer",
580
+ id: "Mulai dengan mengedit",
581
+ es: "Comience por editar",
582
+ }),
583
+ pageLink: "src/app/page.tsx",
584
+ },
585
+ },
586
+ };
587
+
588
+ module.exports = pageContent;
589
+ ```
590
+
591
+ ```json fileName="src/app/page.content.json" contentDeclarationFormat="json"
592
+ {
593
+ "$schema": "https://intlayer.org/schema.json",
594
+ "key": "page",
595
+ "content": {
596
+ "getStarted": {
597
+ "nodeType": "translation",
598
+ "translation": {
599
+ "id": "Mulai dengan mengedit",
600
+ "en": "Get started by editing",
601
+ "fr": "Commencez par éditer",
602
+ "es": "Comience por editar"
603
+ }
604
+ },
605
+ "pageLink": "src/app/page.tsx"
606
+ }
607
+ }
608
+ ```
609
+
610
+ > Deklarasi konten Anda dapat didefinisikan di mana saja dalam aplikasi Anda sepanjang file tersebut dimasukkan ke dalam direktori `contentDir` (secara default, `./src`). Dan sesuai dengan ekstensi file deklarasi konten (secara default, `.content.{json,ts,tsx,js,jsx,mjs,mjx,cjs,cjx}`).
611
+
612
+ > Untuk detail lebih lanjut, lihat [dokumentasi deklarasi konten](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/dictionary/content_file.md).
613
+
614
+ ### Langkah 6: Manfaatkan Konten dalam Kode Anda
615
+
616
+ Akses kamus konten Anda di seluruh aplikasi:
617
+
618
+ ```tsx fileName="src/app/page.tsx" codeFormat="typescript"
619
+ import type { FC } from "react";
620
+ import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
621
+ import { ServerComponentExample } from "@components/serverComponentExample/ServerComponentExample";
622
+ import {
623
+ IntlayerServerProvider,
624
+ useIntlayer,
625
+ getLocale,
626
+ } from "next-intlayer/server";
627
+ import { NextPage } from "next";
628
+ import { headers, cookies } from "next/headers";
629
+
630
+ const PageContent: FC = () => {
631
+ const content = useIntlayer("page");
632
+
633
+ return (
634
+ <>
635
+ <p>{content.getStarted.main}</p>
636
+ <code>{content.getStarted.pageLink}</code>
637
+ </>
638
+ );
639
+ };
640
+
641
+ const Page: NextPage = async () => {
642
+ const locale = await getLocale();
643
+
644
+ return (
645
+ <IntlayerServerProvider locale={locale}>
646
+ <PageContent />
647
+ <ServerComponentExample />
648
+ <ClientComponentExample />
649
+ </IntlayerServerProvider>
650
+ );
651
+ };
652
+
653
+ export default Page;
654
+ ```
655
+
656
+ ```jsx fileName="src/app/page.mjx" codeFormat="esm"
657
+ import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
658
+ import { ServerComponentExample } from "@components/serverComponentExample/ServerComponentExample";
659
+ import { IntlayerServerProvider, useIntlayer } from "next-intlayer/server";
660
+ import { getLocale } from "intlayer";
661
+ import { headers, cookies } from "next/headers";
662
+ import { NextPage } from "next";
663
+
664
+ const Page: NextPage = async () => {
665
+ const content = useIntlayer("page");
666
+
667
+ return (
668
+ <>
669
+ <p>{content.getStarted.main}</p>
670
+ <code>{content.getStarted.pageLink}</code>
671
+ </>
672
+ );
673
+ };
674
+
675
+ const Page = async () => {
676
+
677
+ const locale = await getLocale();
678
+
679
+ return (
680
+ <IntlayerServerProvider locale={locale}>
681
+ <PageContent />
682
+ <ServerComponentExample />
683
+ <ClientComponentExample />
684
+ </IntlayerServerProvider>
685
+ );
686
+ };
687
+
688
+ export default Page;
689
+ ```
690
+
691
+ ```jsx fileName="src/app/page.csx" codeFormat="commonjs"
692
+ import { ClientComponentExample } from "@components/clientComponentExample/ClientComponentExample";
693
+ import { ServerComponentExample } from "@components/serverComponentExample/ServerComponentExample";
694
+ import { IntlayerServerProvider, useIntlayer, getLocale } from "next-intlayer/server";
695
+ import { NextPage } from "next";
696
+ import { headers, cookies } from "next/headers";
697
+
698
+ const Page: NextPage = async () => {
699
+ const content = useIntlayer("page");
700
+
701
+ return (
702
+ <>
703
+ <p>{content.getStarted.main}</p>
704
+ <code>{content.getStarted.pageLink}</code>
705
+ </>
706
+ );
707
+ };
708
+
709
+ const Page: NextPage = async () => {
710
+ const locale = await getLocale();
711
+
712
+ return (
713
+ <IntlayerServerProvider locale={locale}>
714
+ <PageContent />
715
+ <ServerComponentExample />
716
+ <ClientComponentExample />
717
+ </IntlayerServerProvider>
718
+ );
719
+ };
720
+ ```
721
+
722
+ - **`IntlayerClientProvider`** digunakan untuk menyediakan locale ke komponen sisi-klien. Dapat diletakkan di parent component mana pun, termasuk layout. Namun, menempatkannya di layout direkomendasikan karena Next.js membagikan kode layout di seluruh halaman, sehingga lebih efisien. Dengan menggunakan `IntlayerClientProvider` di layout, Anda menghindari menginisialisasi ulang untuk setiap halaman, meningkatkan performa dan menjaga konteks lokalisasi tetap konsisten di seluruh aplikasi Anda.
723
+ - **`IntlayerServerProvider`** digunakan untuk menyediakan locale kepada komponen anak di server. Tidak dapat ditempatkan di layout.
724
+
725
+ > Layout dan halaman tidak dapat berbagi server context yang sama karena sistem server context didasarkan pada penyimpanan data per-request (melalui mekanisme [React's cache](https://react.dev/reference/react/cache)), yang menyebabkan setiap "context" dibuat ulang untuk segmen aplikasi yang berbeda. Menempatkan provider di layout bersama akan merusak isolasi ini, sehingga mencegah propagasi nilai server context yang benar ke komponen server Anda.
726
+
727
+ ```tsx {4,7} fileName="src/components/clientComponentExample/ClientComponentExample.tsx" codeFormat="typescript"
728
+ "use client";
729
+
730
+ import type { FC } from "react";
731
+ import { useIntlayer } from "next-intlayer";
732
+
733
+ export const ClientComponentExample: FC = () => {
734
+ const content = useIntlayer("client-component-example"); // Buat deklarasi konten terkait
735
+
736
+ return (
737
+ <div>
738
+ <h2>{content.title}</h2>
739
+ <p>{content.content}</p>
740
+ </div>
741
+ );
742
+ };
743
+ ```
744
+
745
+ ```jsx {3,6} fileName="src/components/clientComponentExample/ClientComponentExample.mjx" codeFormat="esm"
746
+ "use client";
747
+
748
+ import { useIntlayer } from "next-intlayer";
749
+
750
+ const ClientComponentExample = () => {
751
+ const content = useIntlayer("client-component-example"); // Buat deklarasi konten terkait
752
+
753
+ return (
754
+ <div>
755
+ <h2>{content.title}</h2>
756
+ <p>{content.content}</p>
757
+ </div>
758
+ );
759
+ };
760
+ ```
761
+
762
+ ```jsx {3,6} fileName="src/components/clientComponentExample/ClientComponentExample.csx" codeFormat="commonjs"
763
+ "use client";
764
+
765
+ const { useIntlayer } = require("next-intlayer");
766
+
767
+ const ClientComponentExample = () => {
768
+ const content = useIntlayer("client-component-example"); // Buat deklarasi konten terkait
769
+
770
+ return (
771
+ <div>
772
+ <h2>{content.title}</h2>
773
+ <p>{content.content}</p>
774
+ </div>
775
+ );
776
+ };
777
+ ```
778
+
779
+ ```tsx {2} fileName="src/components/serverComponentExample/ServerComponentExample.tsx" codeFormat="typescript"
780
+ import type { FC } from "react";
781
+ import { useIntlayer } from "next-intlayer/server";
782
+
783
+ export const ServerComponentExample: FC = () => {
784
+ const content = useIntlayer("server-component-example"); // Buat deklarasi konten terkait
785
+
786
+ return (
787
+ <div>
788
+ <h2>{content.title}</h2>
789
+ <p>{content.content}</p>
790
+ </div>
791
+ );
792
+ };
793
+ ```
794
+
795
+ ```jsx {1} fileName="src/components/serverComponentExample/ServerComponentExample.mjx" codeFormat="esm"
796
+ import { useIntlayer } from "next-intlayer/server";
797
+
798
+ const ServerComponentExample = () => {
799
+ const content = useIntlayer("server-component-example"); // Buat deklarasi konten terkait
800
+
801
+ return (
802
+ <div>
803
+ <h2>{content.title}</h2>
804
+ <p>{content.content}</p>
805
+ </div>
806
+ );
807
+ };
808
+ ```
809
+
810
+ ```jsx {1} fileName="src/components/serverComponentExample/ServerComponentExample.csx" codeFormat="commonjs"
811
+ const { useIntlayer } = require("next-intlayer/server");
812
+
813
+ const ServerComponentExample = () => {
814
+ const content = useIntlayer("server-component-example"); // Buat deklarasi konten terkait
815
+
816
+ return (
817
+ <div>
818
+ <h2>{content.title}</h2>
819
+ <p>{content.content}</p>
820
+ </div>
821
+ );
822
+ };
823
+ ```
824
+
825
+ > Jika Anda ingin menggunakan konten Anda dalam atribut bertipe `string`, seperti `alt`, `title`, `href`, `aria-label`, dll., Anda harus memanggil nilai fungsi tersebut, seperti:
826
+
827
+ > ```jsx
828
+ > <img src={content.image.src.value} alt={content.image.value} />
829
+ > ```
830
+
831
+ > Untuk mempelajari lebih lanjut tentang hook `useIntlayer`, lihat [dokumentasi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/packages/next-intlayer/useIntlayer.md).
832
+
833
+ ### (Opsional) Langkah 7: Konfigurasikan Proxy untuk Deteksi Locale
834
+
835
+ Atur proxy untuk mendeteksi locale preferensi pengguna:
836
+
837
+ ```typescript fileName="src/proxy.ts" codeFormat="typescript"
838
+ export { intlayerProxy as proxy } from "next-intlayer/proxy";
839
+
840
+ export const config = {
841
+ matcher:
842
+ "/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
843
+ };
844
+ ```
845
+
846
+ ```javascript fileName="src/proxy.mjs" codeFormat="esm"
847
+ export { intlayerProxy as proxy } from "next-intlayer/proxy";
848
+
849
+ export const config = {
850
+ matcher:
851
+ "/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
852
+ };
853
+ ```
854
+
855
+ ```javascript fileName="src/proxy.cjs" codeFormat="commonjs"
856
+ const { intlayerProxy } = require("next-intlayer/proxy");
857
+
858
+ const config = {
859
+ matcher:
860
+ "/((?!api|static|assets|robots|sitemap|sw|service-worker|manifest|.*\\..*|_next).*)",
861
+ };
862
+
863
+ module.exports = { proxy: intlayerProxy, config };
864
+ ```
865
+
866
+ > `intlayerProxy` digunakan untuk mendeteksi locale pilihan pengguna dan mengarahkan mereka ke URL yang sesuai seperti ditentukan dalam [konfigurasi](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/configuration.md). Selain itu, ini memungkinkan penyimpanan locale pilihan pengguna dalam cookie.
867
+
868
+ > Jika Anda perlu menggabungkan beberapa proxy bersama-sama (misalnya, `intlayerProxy` dengan otentikasi atau proxy kustom), Intlayer kini menyediakan helper yang disebut `multipleProxies`.
869
+
870
+ ```ts
871
+ import { multipleProxies, intlayerProxy } from "next-intlayer/proxy";
872
+ import { customProxy } from "@utils/customProxy";
873
+
874
+ export const proxy = multipleProxies([intlayerProxy, customProxy]);
875
+ ```
876
+
877
+ ### (Opsional) Langkah 8: Ubah bahasa konten Anda
878
+
879
+ Untuk mengubah bahasa konten Anda di Next.js, cara yang direkomendasikan adalah menggunakan komponen `Link` untuk mengarahkan pengguna ke halaman yang sesuai dengan lokal. Komponen `Link` memungkinkan prefetching halaman, yang membantu menghindari reload halaman penuh.
880
+
881
+ ```tsx fileName="src/components/localeSwitcher/LocaleSwitcher.tsx" codeFormat="typescript"
882
+ "use client";
883
+
884
+ import type { FC } from "react";
885
+ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
886
+ import { useLocale } from "next-intlayer";
887
+
888
+ export const LocaleSwitcher: FC = () => {
889
+ const { locale, availableLocales, setLocale } = useLocale({
890
+ onChange: () => window.location.reload(),
891
+ });
892
+
893
+ return (
894
+ <div>
895
+ <button popoverTarget="localePopover">{getLocaleName(locale)}</button>
896
+ <div id="localePopover" popover="auto">
897
+ {availableLocales.map((localeItem) => (
898
+ <button
899
+ key={localeItem}
900
+ aria-current={locale === localeItem ? "page" : undefined}
901
+ onClick={() => setLocale(localeItem)}
902
+ >
903
+ <span>
904
+ {/* Kode locale - mis. FR */}
905
+ {localeItem}
906
+ </span>
907
+ <span>
908
+ {/* Nama bahasa dalam locale-nya sendiri - mis. Français */}
909
+ {getLocaleName(localeItem, locale)}
910
+ </span>
911
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
912
+ {/* Nama bahasa dalam locale saat ini - mis. Francés ketika locale saat ini diset ke Locales.SPANISH */}
913
+ {getLocaleName(localeItem)}
914
+ </span>
915
+ <span dir="ltr" lang={Locales.ENGLISH}>
916
+ {/* Nama bahasa dalam Bahasa Inggris - mis. French */}
917
+ {getLocaleName(localeItem, Locales.ENGLISH)}
918
+ </span>
919
+ </button>
920
+ ))}
921
+ </div>
922
+ </div>
923
+ );
924
+ };
925
+ ```
926
+
927
+ ```jsx fileName="src/components/localeSwitcher/LocaleSwitcher.msx" codeFormat="esm"
928
+ "use client";
929
+
930
+ import { Locales, getHTMLTextDir, getLocaleName } from "intlayer";
931
+ import { useLocale } from "next-intlayer";
932
+
933
+ export const LocaleSwitcher = () => {
934
+ const { locale, availableLocales, setLocale } = useLocale({
935
+ onChange: () => window.location.reload(),
936
+ });
937
+
938
+ return (
939
+ <div>
940
+ <button popoverTarget="localePopover">{getLocaleName(locale)}</button>
941
+ <div id="localePopover" popover="auto">
942
+ {availableLocales.map((localeItem) => (
943
+ <button
944
+ key={localeItem}
945
+ aria-current={locale === localeItem ? "page" : undefined}
946
+ onClick={() => setLocale(localeItem)}
947
+ >
948
+ <span>
949
+ {/* Locale - contohnya FR */}
950
+ {localeItem}
951
+ </span>
952
+ <span>
953
+ {/* Nama bahasa dalam Locale-nya sendiri - contohnya Français */}
954
+ {getLocaleName(localeItem, locale)}
955
+ </span>
956
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
957
+ {/* Nama bahasa dalam Locale saat ini - contohnya Francés ketika locale saat ini disetel ke Locales.SPANISH */}
958
+ {getLocaleName(localeItem)}
959
+ </span>
960
+ <span dir="ltr" lang={Locales.ENGLISH}>
961
+ {/* Nama bahasa dalam Bahasa Inggris - contohnya French */}
962
+ {getLocaleName(localeItem, Locales.ENGLISH)}
963
+ </span>
964
+ </button>
965
+ ))}
966
+ </div>
967
+ </div>
968
+ );
969
+ };
970
+ ```
971
+
972
+ ```jsx fileName="src/components/localeSwitcher/LocaleSwitcher.csx" codeFormat="commonjs"
973
+ "use client";
974
+
975
+ const { Locales, getHTMLTextDir, getLocaleName } = require("intlayer");
976
+ const { useLocale } = require("next-intlayer");
977
+
978
+ export const LocaleSwitcher = () => {
979
+ const path
980
+ const { locale availableLocales, setLocale } = useLocale({
981
+ onChange: ()=> window.location.reload(),
982
+ });
983
+
984
+ return (
985
+ <div>
986
+ <button popoverTarget="localePopover">{getLocaleName(locale)}</button>
987
+ <div id="localePopover" popover="auto">
988
+ {availableLocales.map((localeItem) => (
989
+ <button
990
+ key={localeItem}
991
+ aria-current={locale === localeItem ? "page" : undefined}
992
+ onClick={() => setLocale(localeItem)}
993
+ >
994
+ <span>
995
+ {/* Locale - contoh: FR */}
996
+ {localeItem}
997
+ </span>
998
+ <span>
999
+ {/* Bahasa dalam locale-nya sendiri - contoh: Français */}
1000
+ {getLocaleName(localeItem, locale)}
1001
+ </span>
1002
+ <span dir={getHTMLTextDir(localeItem)} lang={localeItem}>
1003
+ {/* Bahasa dalam locale saat ini - contoh: Francés ketika locale saat ini diatur ke Locales.SPANISH */}
1004
+ {getLocaleName(localeItem)}
1005
+ </span>
1006
+ <span dir="ltr" lang={Locales.ENGLISH}>
1007
+ {/* Bahasa dalam bahasa Inggris - contoh: French */}
1008
+ {getLocaleName(localeItem, Locales.ENGLISH)}
1009
+ </span>
1010
+ </button>
1011
+ ))}
1012
+ </div>
1013
+ </div>
1014
+ );
1015
+ };
1016
+ ```
1017
+
1018
+ > Cara alternatif adalah menggunakan fungsi `setLocale` yang disediakan oleh hook `useLocale`. Fungsi ini tidak akan memungkinkan prefetching halaman. Lihat dokumentasi hook [`useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/packages/next-intlayer/useLocale.md) untuk detail lebih lanjut.
1019
+
1020
+ > Referensi dokumentasi:
1021
+ >
1022
+ > - [hook `useLocale`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/packages/next-intlayer/useLocale.md)
1023
+ > - [hook `getLocaleName`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/packages/intlayer/getLocaleName.md)
1024
+ > - [hook `getLocalizedUrl`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/packages/intlayer/getLocalizedUrl.md)
1025
+ > - [`getHTMLTextDir` hook](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/packages/intlayer/getHTMLTextDir.md)
1026
+ > - [`hrefLang` atribut](https://developers.google.com/search/docs/specialty/international/localized-versions?hl=fr)
1027
+ > - [`lang` atribut](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)
1028
+ > - [`dir` atribut](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir)
1029
+ > - [`aria-current` atribut](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)
1030
+
1031
+ ### (Opsional) Langkah 9: Dapatkan locale saat ini di Server Actions
1032
+
1033
+ Jika Anda membutuhkan locale aktif di dalam Server Action (mis. untuk melokalisasi email atau menjalankan logika yang peka terhadap locale), panggil `getLocale` dari `next-intlayer/server`:
1034
+
1035
+ ```tsx fileName="src/app/actions/getLocale.ts" codeFormat="typescript"
1036
+ "use server";
1037
+
1038
+ import { getLocale } from "next-intlayer/server";
1039
+
1040
+ export const myServerAction = async () => {
1041
+ const locale = await getLocale();
1042
+
1043
+ // Lakukan sesuatu dengan locale
1044
+ };
1045
+ ```
1046
+
1047
+ > Fungsi `getLocale` mengikuti strategi bertingkat untuk menentukan locale pengguna:
1048
+ >
1049
+ > 1. Pertama, ia memeriksa header permintaan untuk nilai locale yang mungkin telah disetel oleh proxy
1050
+ > 2. Jika tidak ada locale yang ditemukan di header, ia mencari locale yang disimpan dalam cookie
1051
+ > 3. Jika tidak ada cookie yang ditemukan, ia mencoba mendeteksi bahasa pilihan pengguna dari pengaturan browser mereka
1052
+ > 4. Sebagai upaya terakhir, ia kembali ke locale default yang dikonfigurasi aplikasi
1053
+ >
1054
+ > Ini memastikan lokal yang paling sesuai dipilih berdasarkan konteks yang tersedia.
1055
+
1056
+ ### (Opsional) Langkah 10: Optmize ukuran bundle Anda
1057
+
1058
+ Saat menggunakan `next-intlayer`, kamus disertakan dalam bundle untuk setiap halaman secara default. Untuk mengoptimalkan ukuran bundle, Intlayer menyediakan plugin SWC opsional yang secara cerdas menggantikan pemanggilan `useIntlayer` menggunakan makro. Ini memastikan kamus hanya disertakan dalam bundle untuk halaman yang benar-benar menggunakannya.
1059
+
1060
+ Untuk mengaktifkan optimisasi ini, pasang paket `@intlayer/swc`. Setelah terpasang, `next-intlayer` akan secara otomatis mendeteksi dan menggunakan plugin tersebut:
1061
+
1062
+ ```bash packageManager="npm"
1063
+ npm install @intlayer/swc --save-dev
1064
+ npx intlayer init
1065
+ ```
1066
+
1067
+ ```bash packageManager="pnpm"
1068
+ pnpm add @intlayer/swc --save-dev
1069
+ pnpm intlayer init
1070
+ ```
1071
+
1072
+ ```bash packageManager="yarn"
1073
+ yarn add @intlayer/swc --save-dev
1074
+ yarn intlayer init
1075
+ ```
1076
+
1077
+ ```bash packageManager="bun"
1078
+ bun add @intlayer/swc --dev
1079
+ bunx intlayer init
1080
+ ```
1081
+
1082
+ > Catatan: Optimisasi ini hanya tersedia untuk Next.js 13 ke atas.
1083
+
1084
+ > Catatan: Paket ini tidak terpasang secara default karena plugin SWC masih eksperimental pada Next.js. Hal ini dapat berubah di masa depan.
1085
+
1086
+ > Catatan: Jika Anda mengatur opsi sebagai `importMode: 'dynamic'` atau `importMode: 'live'`, itu akan bergantung pada Suspense, jadi Anda harus membungkus pemanggilan `useIntlayer` Anda dalam boundary `Suspense`. Artinya, Anda tidak akan dapat menggunakan `useIntlayer` langsung di tingkat atas komponen Page / Layout Anda.
1087
+
1088
+ ### Pantau perubahan kamus pada Turbopack
1089
+
1090
+ Ketika menggunakan Turbopack sebagai server pengembangan dengan perintah `next dev`, perubahan kamus tidak akan terdeteksi secara otomatis secara default.
1091
+
1092
+ Keterbatasan ini terjadi karena Turbopack tidak dapat menjalankan plugin webpack secara paralel untuk memantau perubahan pada file konten Anda. Untuk mengatasi hal ini, Anda perlu menggunakan perintah `intlayer watch` untuk menjalankan server pengembangan dan watcher build Intlayer secara bersamaan.
1093
+
1094
+ ```json5 fileName="package.json"
1095
+ {
1096
+ // ... Konfigurasi package.json Anda yang sudah ada
1097
+ "scripts": {
1098
+ // ... Konfigurasi skrip yang sudah ada
1099
+ "dev": "intlayer watch --with 'next dev'",
1100
+ },
1101
+ }
1102
+ ```
1103
+
1104
+ > Jika Anda menggunakan next-intlayer@<=6.x.x, Anda perlu mempertahankan flag `--turbopack` agar aplikasi Next.js 16 bekerja dengan benar menggunakan Turbopack. Kami merekomendasikan menggunakan next-intlayer@>=7.x.x untuk menghindari keterbatasan ini.
1105
+
1106
+ ### Konfigurasi TypeScript
1107
+
1108
+ Intlayer menggunakan module augmentation untuk mendapatkan manfaat TypeScript dan membuat codebase Anda lebih kuat.
1109
+
1110
+ ![Pelengkapan Otomatis](https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true)
1111
+
1112
+ ![Kesalahan terjemahan](https://github.com/aymericzip/intlayer/blob/main/docs/assets/translation_error.png?raw=true)
1113
+
1114
+ Pastikan konfigurasi TypeScript Anda menyertakan tipe yang dihasilkan secara otomatis.
1115
+
1116
+ ```json5 fileName="tsconfig.json"
1117
+ {
1118
+ // ... Konfigurasi TypeScript Anda yang sudah ada
1119
+ "include": [
1120
+ // ... Konfigurasi TypeScript Anda yang sudah ada
1121
+ ".intlayer/**/*.ts", // Sertakan tipe yang dihasilkan secara otomatis
1122
+ ],
1123
+ }
1124
+ ```
1125
+
1126
+ ### Konfigurasi Git
1127
+
1128
+ Disarankan untuk mengabaikan berkas yang dihasilkan oleh Intlayer. Ini memungkinkan Anda menghindari meng-commit berkas-berkas tersebut ke repository Git Anda.
1129
+
1130
+ Untuk melakukan ini, Anda bisa menambahkan instruksi berikut ke file `.gitignore` Anda:
1131
+
1132
+ ```plaintext fileName=".gitignore"
1133
+ # Abaikan berkas yang dihasilkan oleh Intlayer
1134
+ .intlayer
1135
+ ```
1136
+
1137
+ ### Ekstensi VS Code
1138
+
1139
+ Untuk meningkatkan pengalaman pengembangan Anda dengan Intlayer, Anda dapat memasang resmi **Ekstensi Intlayer untuk VS Code**.
1140
+
1141
+ [Instal dari VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)
1142
+
1143
+ Ekstensi ini menyediakan:
1144
+
1145
+ - **Autocompletion** untuk kunci terjemahan.
1146
+ - **Deteksi kesalahan secara real-time** untuk terjemahan yang hilang.
1147
+ - **Pratinjau inline** dari konten yang diterjemahkan.
1148
+ - **Tindakan cepat** untuk dengan mudah membuat dan memperbarui terjemahan.
1149
+
1150
+ Untuk detail lebih lanjut tentang cara menggunakan ekstensi, lihat dokumentasi [Intlayer VS Code Extension](https://intlayer.org/doc/vs-code-extension).
1151
+
1152
+ ### Lebih Lanjut
1153
+
1154
+ Untuk langkah lebih lanjut, Anda dapat mengimplementasikan [editor visual](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/intlayer_visual_editor.md) atau mengeksternalisasi konten Anda menggunakan [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/id/intlayer_CMS.md).