Skip to content

docs: add internationalization (i18n) guide - #945

Draft
Gaic4o wants to merge 1 commit into
feature-sliced:mainfrom
Gaic4o:i18n
Draft

Gaic4o wants to merge 1 commit into
feature-sliced:mainfrom
Gaic4o:i18n

Conversation

@Gaic4o

@Gaic4o Gaic4o commented Aug 3, 2026

Copy link
Copy Markdown
Member

Background

This guide explains where i18n-related code can be placed in an FSD project.

It focuses on the responsibilities of i18n setup, translation resources, locale, and language switching, including how shared/i18n, app/i18n, entities, and features can be used, as well as examples of organizing translation resources based on project size and usage scope.

Changelog

Closes #171

@Gaic4o
Gaic4o marked this pull request as ready for review August 3, 2026 12:09
@github-actions

github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
pr-fsd ✅ Ready (View Log) Visit Preview 209324e

@Solant

Solant commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

A bit of feedback from my end:

  • nit: i18n setup looks a bit React-specific, especially with i18n instance passing, which might be a bit disruptive for other frameworks like Vue, so I'm not sure if this step is really necessary
  • I like the point of not creating i18n as an entity; I would even ban this approach right away
  • While I don't really like storing messages and i18n config in shared/i18n, it is an understandable approach. but using i18n as a slice segment outside shared is a bit worrying, as we try to keep custom segments to the minimum (we even had assets segment removed in favor of /ui/assets/), so I think that we should not make an exception there and use <slice>/ui/messages or <slice>/ui/i18n for localized messages (just like you did with /ui/messages.ts)
  • I don't really like the example of User entity that uses Locale. I think it would be better to make an example of User being part of shared/api or shared/auth, for example

But overall I like this article; great job!

@Gaic4o
Gaic4o marked this pull request as draft August 30, 2026 05:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HOWTO: Add an internationalization guide

2 participants