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

Question: How can we localize all texts ? #35

Closed
tjaskula opened this issue Apr 18, 2018 · 6 comments · Fixed by #49
Closed

Question: How can we localize all texts ? #35

tjaskula opened this issue Apr 18, 2018 · 6 comments · Fixed by #49

Comments

@tjaskula
Copy link

Is there an easy way to localize texts in any language ?

@gregnb
Copy link
Owner

gregnb commented Apr 18, 2018

Hey @tjaskula, there is not any localization support as it stands today. It is a feature that is definitely in the future roadmap

@victorbueno
Copy link

Could we use https://github.com/stefalda/localized-strings ?

@gregnb
Copy link
Owner

gregnb commented May 4, 2018

@victorbueno I think to start I will provide something in the options that will allow you to start overriding the default language as opposed to storing different language sets

const options = {
   textLabels: {
      pagination: {
         labelRowsPerPage: "Zeilen pro Seite:",
      },
      toolbar: {
        viewColumns: ""
     }
   }
};

@victorbueno
Copy link

@gregnb that's even better!

@gregnb
Copy link
Owner

gregnb commented May 13, 2018

I'm going to finish this feature today and here's what I have so far for options:

Pass in a property named textLabels via options prop

      textLabels: {
        pagination: {
          next: "Next Page",
          previous: "Previous Page",
          rowsPerPage: "Rows per page:",
          displayRows: "of" // 1-10 of 30
        },
        toolbar: {
          search: "Search",
          downloadCsv: "Download CSV",
          print: "Print",
          viewColumns: "View Columns",
          filterTable: "Filter Table"
        },
        filter: {
          title: "FILTERS",
          reset: "reset",          
        },
        viewColumns: {
          title: "Show Columns"
        },
        selectedRows: {
          text: "rows(s) deleted",
          delete: "Delete"
        }
    }

@gregnb
Copy link
Owner

gregnb commented May 14, 2018

This issue is resolved in 2.0.0-beta-6 which will also require upgrade to the latest material-ui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants