Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support localization for Tonic UI components #891

Closed
cheton opened this issue Jul 11, 2024 · 2 comments
Closed

Support localization for Tonic UI components #891

cheton opened this issue Jul 11, 2024 · 2 comments
Assignees
Milestone

Comments

@cheton
Copy link
Member

cheton commented Jul 11, 2024

Overview

https://mui.com/material-ui/guides/localization/

MUI utilizes the theme to configure the locale text globally:

import { createTheme, ThemeProvider } from '@mui/material/styles';
import { zhCN } from '@mui/material/locale';

const theme = createTheme(
  {
    palette: {
      primary: { main: '#1976d2' },
    },
  },
  zhCN,
);

<ThemeProvider theme={theme}>
  <App />
</ThemeProvider>;

For more details, you can find the source in the GitHub repository.

To support localization in Tonic UI, DefaultPropsProvider must be implemented. Here are the relevant links:

Related issues: #73, #180

@cheton
Copy link
Member Author

cheton commented Sep 20, 2024

Support for DefaultPropsProvider was introduced in PR #922.

@cheton
Copy link
Member Author

cheton commented Nov 11, 2024

Related to #945

@cheton cheton closed this as completed Dec 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant