Expand my Community achievements bar.

SOLVED

Difference between jcr:primaryType being nt:folder Vs jcr:primaryType being sling:MessageEntry while creating i18n keys

Avatar

Level 4

While creating i18n keys, I see that for some i18n keys the value of jcr:primaryType is nt:folder  whereas for rest of them, the value of  jcr:primaryType is sling:MessageEntry. 
Why is this difference ? And will this have any impact ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @SHIBANI06 

  If jcr:mixingType is set as sling:message then It does not matter if type is nt:folder or sling:messageEntry. In both scenario you will get correct result.

 

Hope this helps.

 

Thanks

Dipti Chauhan

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @SHIBANI06 ,

 

If you see the Apache documentation then you will find that for

 

language folder - example en, de, fr, etc

 

  • jcr:primaryType = nt:folder
  • jcr:mixinTpes = mix:language

 

And for each messages (for which you want to put language specific value)

  • jcr:primaryType = sling:MessageEntry 
  • sling:key
  • sling:message.

 

https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html

Avatar

Level 4

Hi @Ritesh_Mittal ,

 

But in my case, some of the i18n keys are having this property

  • jcr:primaryType = nt:folder

 

Avatar

Employee Advisor

If you are talking about product i18n nodes, can you give the exact path?

 

A sling:messageEntry nodetype has the mixinType "sling:message" (which requires a node to have the properties "sling:key" and "sling:message").

And you can choose any other nodetype and add the mixinType "sling:message" to achieve the very same behavior.

 

Avatar

Correct answer by
Community Advisor

Hi @SHIBANI06 

  If jcr:mixingType is set as sling:message then It does not matter if type is nt:folder or sling:messageEntry. In both scenario you will get correct result.

 

Hope this helps.

 

Thanks

Dipti Chauhan