Skip to content
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

Support localization for Tonic UI components #891

Open
cheton opened this issue Jul 11, 2024 · 1 comment
Open

Support localization for Tonic UI components #891

cheton opened this issue Jul 11, 2024 · 1 comment
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.

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

No branches or pull requests

1 participant