I am facing an issue with i18n labels.
My application reads few i18n labels at js frontend using Granite.I18n.get('') function. The entire dictionary gets downloaded as ‘/libs/cq/i18n/dict.{+locale}.json’ as dictated in ‘/etc/clientlibs/foundation/shared/source/init.js’.
Now the en dictionary returns only the custom labels and is small size. But other languages like fr,the dictionary file is aggregation of all /libs dictionary and is very huge. I noticed this in few other sites also.
tennantco.com
en dictionary - 118 KB
fr dictionary - 1.4 MB
Timewarnercable.com
en dictionary - 1.1 KB
fr dictionary - 1.2 MB
Thermofisher
en dictionary - 3 KB
fr dictionary - 695 KB
Our pain point with this is, cost of caching this heavy file at CDN increases and trying to find a way to reduce CDN cost.
I understand en labels are the key itself. But the ExportServlet is able to filter out the render custom dictionary only for en. Our dictionaries are similar to otb dictionaries under /libs. Then how come ExportServlet treat otb labels under en export?
Is this bug common in all CMS products or specific to Adobe? Also need a solution or workaround to get custom dictionary only for other languages.