-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Providing own locales for built-in texts #1065
Comments
I'll think what I can do. I'll come back in a couple of days with a plan |
BTW why don't we just accept pull requests with new language keysets? This looks simpler, compared to calling a separate function before the app startup. But yeah, it prolongs the onboarding process for a foreign project, because you need to either make a fork and fix it there, or to wait for the PR to be accepted |
We've talked about it, and the implementation in #1844 lacks proper typing. The new idea is to infer keys from import type BreadcrumbsEn from '../../../Breadcrumbs/en.json';
import type DialogEn from '../../../Dialog/i18n/en.json';
type Keysets = {
breadcrumbs: typeof BreadcrumbsEn;
dialog: typeof DialogEn;
};
function test() {
const keyset: Keysets = {
dialog: {
close: 'Chiudere',
},
breadcrumbs: {
breadcrumbs: 'briciole di pane',
label_more: 'Di più',
},
};
registerCustomKeyset('it', keyset);
} But in this implementation we'll need to add newly added component keys manually to this Also I've heard that you have some parts of code ready, what will we do with it? |
Currently there are only two locales available, en and ru. There should be a way to pass any custom locale.
The text was updated successfully, but these errors were encountered: