Vivek Dhiman
Vivek Dhiman

Reputation: 1997

Overlay issue in i18n AEM6.0

We have some sites such as:

/apps/site1
        |----i18n
               |---data
               |---keys
               |---languages
               |---translator

/apps/site2
        |----i18n
               |---data
               |---keys
               |---languages
               |---translator

Now when we hit the site, we can see the call libs/cq/i18n/dict.xx-xx.json. Ideally that call should be either from /apps or /etc. How can I achieve this?

OOTB servlet :

@Component
@Service({Servlet.class})
@Properties({@Property(
    name = "service.description",
    value = {"ResourceBundle Renderer Servlet"}
), @Property(
    name = "sling.servlet.paths",
    value = {"/libs/cq/i18n/dict"}
)})
public class ResourceBundleExportServlet extends SlingSafeMethodsServlet {

Upvotes: 0

Views: 262

Answers (1)

awd
awd

Reputation: 2322

This is not possible, as of aem 6.3 (and earlier versions) that path was hard-coded pretty much everywhere it was used. to use a custom path you will have to-

  1. Register custom servlet at /apps/cq/i18n/dict.xx-xx.json (or path of your choice) to return i18n values.
  2. Change AEM ootb code that uses the hardcoded path to use your custom path.

Upvotes: 1

Related Questions