uptick/react-keyed-file-browser

Support for localization

Opened this issue · 5 comments

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

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

@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.

Sure, have to start somewhere. :)

jlo-1 commented

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

is it supporting this feature right now?