i18n translation not working in AEM 6.4 | Community
Skip to main content
vijays80591732
New Participant
December 31, 2018
Solved

i18n translation not working in AEM 6.4

  • December 31, 2018
  • 13 replies
  • 10949 views

Hi All,

After upgrade my project from AEM 6.1 to AEM 6.4, i18n translation is not working. I could see this has been deprecated in AEM 6.4. Is this causing any issue?

I tried with below steps but didn't workout,

1) Restarted Apache Sling Internationalization Support.

2) added sling:message in /oak:index/nodetype -> declaringNodeTypes and reindexed.

can anyone help me on this?

smacdonald2008kautuksahniArun Patidarjorgeh3453905

Thanks,

Vijay

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by vijays80591732

Hi Puzanovs,

Thanks for your input and the issue has been fixed now.

The way of calling the service (I18nTenantRuntimeExtension) should be something different in AEM 6.4.

Below are the fix:

  • Removed felix annotations and placed OSGI annotations.
  • Added org.apache.sling.scripting.sightly.compiler.java dependency in parent.pom and bundle.pom. This is the dependency which we are using for RuntimeExtension interface.
  • In I18nTenantRuntimeExtension the property value is “i18ntranslation” in AEM 6.1, but the property value should be “i18n” in AEM 6.4

In felix (before fix):

@Component

@Service(RuntimeExtension.class)

@Properties({

    @Property(name = RuntimeExtension.NAME,

        value = I18nTenantRuntimeExtension.I18N_TRANSLATION_FUNCTION),

    @Property(name = Constants.SERVICE_RANKING, intValue = 10000)})

public class I18nTenantRuntimeExtension implements RuntimeExtension {

  @Reference

  private ConfigService configService;

  private static final Logger LOG = LoggerFactory.getLogger(I18nTenantRuntimeExtension.class);

  public static final String I18N_TRANSLATION_FUNCTION = "i18nTranslation";

  public static final String KEY_PREFIX = "Key: ";

In OSGI (after fix):

@Component(

        service = RuntimeExtension.class,immediate = true,

        property = {

I18nTenantRuntimeExtension.NAME + "=" + I18nTenantRuntimeExtension.I18N,

I18nTenantRuntimeExtension.SERVICE_RANKING + "=" + 10000

        }

)

public class I18nTenantRuntimeExtension implements RuntimeExtension {

  private ConfigService configService;

  @Reference

  public void bindConfigService(ConfigService configService) {

    this.configService = configService;

  }

  public void unbindConfigService(ConfigService configService) {

    this.configService = configService;

  }

  private static final Logger LOG = LoggerFactory.getLogger(I18nTenantRuntimeExtension.class);

  public static final String NAME = "org.apache.sling.scripting.sightly.extension.name";

  public static final String I18N = "i18n";

  public static final String SERVICE_RANKING = "service.ranking";

  public static final String KEY_PREFIX = "Key: ";

Thanks smacdonald2008gauravb10066713bsloki​ @Jorg

Thanks,
Vijay

13 replies

vijays80591732
New Participant
January 1, 2019

Hi Gaurav,

I'm facing this issue in my local AEM 6.4 and I logged in as Admin. I have verified the ACLs and I'm having the read access for the below highlighted services. Do I need to check anything apart from this?

Thanks,

Vijay

smacdonald2008
New Participant
December 31, 2018

I asked our translation team to check this thread.

Gaurav-Behl
New Participant
December 31, 2018

Try this - i18n translations are no longer working

Validate the ACL of service user that you have created in 6.4. Logging-in as Admin or any other user won't help but the ACLs configured on the service user.