Member
Member
Michel Gagnon   01-01-2016, 19:38
#1

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

Administrator
Administrator
acrylian   01-01-2016, 21:25
#2
  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.

Member
Member
Michel Gagnon   01-01-2016, 22:34
#3

Great!
Thank you.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.