Closed n1crack closed 9 months ago
@DreamlandOwO we should refactor uppy codes. Before it was less than 140lines, now it is almost 500 lines of code. I'm gonna leave it to you 😆 I have no idea whats going on there..
Ok, big update related to localization part. Multi language will not be loaded automatically, you need to import the language files yourself when registering the component.
so registering the Vuefinder like this:
app.use(VueFinder)
as a result, lang dropdown will be hidden, and english will be the main language :
The localization files are under the "dist/locales" folder.
Normally, you would like to import the locales from the package, the only thing, just be sure the locale keys matches the filename..
app.use(VueFinder,
{
i18n: {
en: async () => await import ("vuefinder/dist/locales/en.js"),
// add many as you like, they will be added to dropdown in the vuefinder's settings modal.
}
}
)
if you dont want to import async, you can import the locales like this.
//..
import en from "vuefinder/dist/locales/en.js"
import fr from "vuefinder/dist/locales/fr.js"
// other langs..
//..
app.use(VueFinder,
{
i18n: { en, fr }
}
)
this should be added the documentation ofc.
I had to put i18n insiide computed object, it wasn't updated as expected. i18n functionality should be refactored later.
I think we are close to finishing this PR. Maybe we should make another PR for the last 2 todo items.