Hi there,
I have what I hope is a relatively simple question to answer. According the live documentation at Internationalization, implementing internationalization on a server-side plugin can be done via a provided API class:
The component
org.sonar.api.i18n.I18n
is available for web server extensions.
However when experimenting I quickly realised that this class has been marked as deprecated
. A quick look at Plugin basics shows this has been the case since SonarQube 7.8.
I am unable to find any documentation that says what approach should be used in its place. Interestingly the JIRA that the deprecation was made in ([SONAR-9898] - Jira) states:
Let’s fully deprecate org.sonar.api.i18n.I18n as there’s no more reason for a plugin to use it.
I realise that plugin properties support localization via bundle keys, but what about other custom localization values that may be used server-side e.g. when sending custom notifications etc. Previously you would retrieve these via the message
method on the I18n
interface.
If you could please clarify what the recommended approach is moving forwards, particularly from the perspective of usage in a @ComputeEngineSide
extension, it would be greatly appreciated!
Thanks in advance,
Sam