ZenphotoCMS Forum
Theme translation - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Translating (https://forum.zenphoto.org/forum-8.html)
+--- Thread: Theme translation (/thread-12400.html)



Theme translation - Michel Gagnon - 01-01-2016

Hello,

I have already visited this page: http://www.zenphoto.org/news/translating-tutorial/#theme-translation

Two questions remain unanswered.
– For core Zenphoto contents, the functions gettext() and ngettext() exist. For extra themes, I can use gettext_th(). Is there a similar function for plural strings?

– I only want to provide English and French. If I prepare a locale folder with a French translation, do I still need to have an empty en-US folder? If I later want to distribute my theme and, say, a German user wants to use it, will he be OK or do I need to place an empty de_DE folder?

Thanks




Theme translation - acrylian - 01-01-2016

  1. Yes, there is ngettext_th() for themes and ngettext_pl() for plugins.
    http://www.zenphoto.org/documentation/core/_functions-i18n.php.html#functionngettext_th
    http://www.zenphoto.org/documentation/core/_functions-i18n.php.html#functionngettext_pl

  2. For themes and plugins you only need a locale folders for the languages you actually provide. The theme/plugin should fallback to the nativly coded language. That at best should be English naturally since everything else is as well.




Theme translation - Michel Gagnon - 01-01-2016

Great!
Thank you.