Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

SHIBANI06
Level 2
Level 2

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
Dipti_Chauhan
Correct answer by
Community Advisor
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

0 Replies
Ritesh_M
Community Advisor
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

SHIBANI06
Level 2
Level 2

Hi @Ritesh_M ,

 

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

  • jcr:primaryType = nt:folder

 

Jörg_Hoh
Employee
Employee

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.

 

Dipti_Chauhan
Correct answer by
Community Advisor
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