Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

i18n display keys instead of values

Avatar

Level 3

Hello,

 

We are facing a issue with i18n in our component dialogs in AEM6.1

It display the key instead of the values.

We followed the documentation (code sample below)

<componentName.key jcr:primaryType="sling:MessageEntry" sling:key="componentName.key" sling:message="The component value"/>

 

Restarting the bundle (Apache Sling Internationalization Supportorg.apache.sling.i18n) after installing the project fixes the issues.

Is there a way to always restart that bundle on code deploy? Is there a better fix? Are we missing something?

6 Replies

Avatar

Level 3

Is there a way to restart a bundle every time a package is installed in the package manager?

Avatar

Level 9

Does a bundle which you want to re-start isn't part of your package manager?. If it is part of PM, then no need to re-stat bundle explicitly. After package manager installations, bundles automatically get refreshed.

---Jitendra

Avatar

Level 3

No, the bundle I want to restart is the default i18n from AEM.

Apache Sling Internationalization Support (org.apache.sling.i18n)

Avatar

Level 9

Hi,

OSGI Bundle API does provide a way to play with Bundle like start, stop etc. All you need to have is bundle ID.

User BundleContext to getBundle, And, bundle provides start/stop methods. This should be done in the bunlde-activator class.

API :https://osgi.org/javadoc/r4v43/core/org/osgi/framework/Bundle.html

---Jitendra

Avatar

Level 3

Thank you, I didn't know about Bundle Activator.

I worked.

Avatar

Level 9

Let me know if you got what you are trying to achieve.

murilod74686477 wrote...

Thank you, I didn't know about Bundle Activator.

I worked.