|
|
Internationalisation (i18n) aka translation servicesWe "ported" most of the cocoon i18n transformer to popoon. See http://cocoon.apache.org/2.1/userdocs/i18nTransformer.html for some introduction. If it's not already in the sitemap, you should add the following directives to your sitemap The catalog xml file with the translations then go into "xml/catalog_$lang.xml" How to actually use the i18n feature in your XML/XSLT files is quite well described on the cocoon page (i18n:translate isn't integrated yet, but the rest should be) You can also interface with the i18n classes directly from within PHP You can use i18n:attr to translate attributes.How to get all my i18n keys from a website?How to get all my i18n keys from a website? Get i18n in JavaScriptFirst, add the attribute 'ref="js"' to every key you want to use in javascript, like: Then, add the following line somewhere to <head> in the xslt file you need that (master.xsl, if it's general) In the global Javascript array i18n you have now all the keys marked with _ref="js", eg. Other example with JS
|