The autoupdate currently works for components as that's the only thing that displays things.

However there are classes that contain text. There are a couple ways we can proceed with these things... in applyLocales method of Ux.locale.Manager we can fire an event and your application can listen to this and handle it. Or we can create mixins for these other classes that we can use and those can have the individual logic for each class... any other suggestions for that?

For the dataview, wonder if you could use prepareData or hook into the container's updateListItem method

Hi Mitchell,

I'm coming across a similar issues where DataViews/Templated components need to be refreshed (where there are string literals inside) and Stores regenerated which requires a little more specific logic than the standard component properties do for updating.

I like the idea of an event being fired which these troublesome components can listen to it and do what they need to.

Another option might be to allow a function to be passed in the locales config which would get executed in the scope of the component when the locale is changed and this logic can reside there.

Anyways, I'll try and report back on what I end up doing and seeing what works best.

Thanks for your work on this - it certainly takes the pain out of localising apps!

It changes the original content so you can't translate it back/again... but I'm going to have to move onto more important things for now.

I tried overriding prepareData() but it's called before the item get's the locale manager stuck to it so it's too early to do it for me.

Also: I was talking about having a default locale that doesn't need translations. In the end I just made the defaultText the original text that get's passed into the translation tool so you don't need english translations and if the text hasn't been done then it will display english anyway... better in english than in nothing.

Just looking at translating the Title within NavigationView/Bar and it's peppered all over the code.
Looks like it's going to require quite a bit of know-how to edit this one and I bet it changes massively in the next release.

Edit: I decided to kill all NavigationView/Bar's in my application as I feel they're annoying for adding Back Button as well. I think you either use the NV/Bar for your entire application or not at all...

Had to translate selectfields. As you can't set a locales: {} with everything in there (doesn't really make sense). I removed all the placeholder stuff as I'm not really using it (strings default to EN for me). It's easy looking at the others to add it back. I see that if you translate a label on the selectfield as well then setLocale gets called twice on the same component, which I guess need to be merged somehow.

Basically, upon setLocale it sets the _originalString field to the store to hold the displayField so that when you change the locale again, it will still know the original string.