Reputation: 1125
How it's possible to support different language in safari extension ?
In Chrome Extension, just need to load the different JSON files languages on the manifest and Chrome load automatically the good one. After that, it's possible to access of the language's strings with a method:
chrome.i18n.getMessage("hello")
Something like that on safari ?
Upvotes: 0
Views: 1048
Reputation: 89549
Apple sure does not make it easy. I did a pretty thorough search on Apple's Safari Developer Portal and there's nothing there that talks about "localize" or "localization", not even in the Safari Extensions Development Guide.
In cases like this, developers are kind of on their own. I'd recommend filing bugs (via http://bugreporter.apple.com ) for both documentation to be added to the Safari Extension development guides and also something more obvious to be added to the Extension Builder built into Safari.
If this were my problem, I'd approach this by looking at other open source Safari plugins that do have support for multiple languages. For example, "ClickToPlugin" Safari Extension on GitHub has a localization.js file which affects the Settings and the menu items in the Global js file.
Upvotes: 2