Forum

Thread tagged as: Problem, Error, Addons

Assets widget localization

The whole Assets sidebar can not be translated. Maybe its being generated dynamically via javascript, not using the language files in lang folder. Translating lines such as "Select an Asset", "Use selected", etc have no effect at all. Also "Select or upload an image" line is not being translated (also probably because its generated via JS)

Pavel Golovin

Pavel Golovin 0 points

  • 6 years ago

Also "Delete this item? Yes/No" dialog can't be translated (in any context, Tags for example)

Also, "Toggle sidebar" and I guess many others added via JS that I haven't noticed yet

Drew McLellan

Drew McLellan 2638 points
Perch Support

UI generated by JavaScript does still use the translation system. The Assets functionality is newer, so may not be included in all localisations.

Do you see any errors in your browser console? Translations are loaded in via the /perch/core/inc/js_lang.php file. In the Network tab of your dev tools, you should be able to see a request to js_lang.php?v=2.7.6.

Magically it started working!! I guess I have a cache problem somewhere, and after a few hours it finally refreshed...

One thing thats left is the "Yes/No" buttons for confirm delete dialog (still won't translate), but I can live with it

Drew McLellan

Drew McLellan 2638 points
Perch Support

I will look into that.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I've fixed that for the next release - thanks!

great!