silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
20 stars 79 forks source link

Translate labels #1358

Closed jakmax76 closed 1 year ago

jakmax76 commented 1 year ago

Hi, i try to translate these 2 labels but I can't:

AssetAdmin.UPLOADFIELD_UPLOAD_NEW AssetAdmin.UPLOADFIELD_CHOOSE_EXISTING

i don't know how to extend the translation for javascripts.

For PHP i create lang folder into app folder

image

For Js i think i need to create file it.js for example

ss.i18n.addDictionary('it', { "AssetAdmin.UPLOADFIELD_UPLOAD_NEW": "Add directory", });

but i don't know where to put it.

Or is a missing key here? vendor/silverstripe/asset-admin/client/lang/it.js

Can you help me?

Thank you

maxime-rainville commented 1 year ago

I would suggest you have a look at this doc article: https://docs.silverstripe.org/en/5/developer_guides/i18n/#javascript-usage

If your desired language is missing specific translations, I would suggest you contribute them back to our Transifex account. That way other people can benefit from it as well: https://docs.silverstripe.org/en/5/contributing/translations/

Otherwise the issue tracker is reserved for reporting bugs and we don't provide support via the issue tracker. There are great community support options where you can get help including our forum, Stack Overflow (remember to tag as silverstripe) and even Slack.