uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
304 stars 144 forks source link

Support for localization #19

Open dariospadoni opened 6 years ago

dariospadoni commented 6 years ago

Is there a way to translate the texts (ie. "File", "Size", "Modified",.. ) which are currently hardcoded?

jarekwg commented 6 years ago

Nope, unfortunately there's currently zero localisation support, but you're welcome to submit a PR to improve this!

seanmadi commented 5 years ago

@jarekwg Would you accept a PR with just localization support for the labels in the Action bar? It may just be the way I'm using it, but I've been able to add localization to all of the other places by utilizing the renderers (FilterRenderer, FileRenderer, FolderRenderer), and the Action bar seems to be the only place I can't override that includes hardcoded text.

jarekwg commented 5 years ago

Sure, have to start somewhere. :)

jlo-1 commented 3 years ago

Hey, also looking for a way to translate the action texts. I looked into this and found the property "actions", this might be what I need. Still can't figure out what to pass into this. Could anyone provide a simple example for this?

You need to create your own ActionRenderer with your own text for the actions and pass that in as a prop to the FileBrowser component.

Here is our default that you can use as a reference https://github.com/uptick/react-keyed-file-browser/blob/master/src/actions/default.js

atikmahbub commented 2 years ago

is it supporting this feature right now?