-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[core] Add localization #18219
[core] Add localization #18219
Conversation
@material-ui/core: parsed: +0.09% , gzip: +0.11% Details of bundle changes.Comparing: 64ae0c6...da38bff
|
0eec5e4
to
e5aaee9
Compare
de44822
to
8de6b20
Compare
b3d00ca
to
840aec6
Compare
@soltanloo Alright, I have pushed the approach a bit further. I would love to get feedback on this. At first, I thought that a I have introduced a new page in the documentation, that covers globalization. right-to-left is one part of it (maybe they should be merged?). The quality of the translations I have done is not great. It would be awesome if native speakers can double-check them. (de-DE @eps1lon?, fr-FR @oliviertassinari, zh-CN @DDDDDanica?, ru-RU @dmtrKovalenko?, pt-BR @jaironalves?, es-ES @tkanzakic? ja-JP @yamuun?) 😄 cc @mui-org/core-contributors. |
@jaironalves and the other translators, what do you think of contributing the better translations after this effort moves forward? I understand that the current Crowdin translation mechanism doesn't account for any contribution stats on your GitHub profile, at least, this would be a way to get you guys some credit (with a commit)? |
fb29243
to
daaee1d
Compare
Update Localization and Autocomplete docs Co-Authored-By: Matt <[email protected]>
093b24f
to
28c9e20
Compare
@soltanloo Thank you for spending time with us on this problem |
@oliviertassinari That is great. Thank you for that. This will make the internationalization a lot easier. |
@Domino987 :). What would be the objective of such a list? |
Because I already localize all my components currently and with these changes, I can remove my local localisation on the components, which already are localized now with the theme. For example the empty option of the select/autocomplete. I added that manually but I could remove that with the localisation. But I do not know, which components are affected. |
@Domino987 I think that developers can expect all the Material-UI components to be localized. You should be able to remove all your custom props. |
I don't really understand the orientation chosen for i18n... Just my 2 cents... PS: I've just read my comment and it's prehaps irrevelevant because I speak about internationalization and not localization... (by the way, is it so different ?) |
@dabretin Thanks for the feedback. |
Is it possible to import only a specific locale instead of importing the entire locale.js file? We only need a handful of them yet we're importing all of it. I'll open an issue if this is not yet possible. import frFR from '@material-ui/core/locale/frFR';
// Instead of
import { frFR } from '@material-ui/core/locale'; |
@Floriferous What's your concern? The unused locales are tree shaken in production. |
This pull request closes #18202.
Edit by @oliviertassinari
Benchmark
messages
proptodayButton
proplocale
L10n
singletonlocaleText
object option keytodayButtonText
propmessages
singleton configmessages
propxText
propslocalization
proptextLabels
proplanguage
object option key