Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unified directory for plugin translation files
#9
@yojoe: whether the files are stored as plugins/<plugin>_<lang>.php or plugins/lang/<plugin>/<lang>.php or plugins/<plugin>/lang/<lang>.php doesn't matter from a technical POV (in the latter case it's just easiest to identify the files for a plugin, simply <plugin>.php and the <plugin> directory). I'm happy with any standard.

I agree, as long it's possible using GetSimple translations is best to have consistent texts.

@ccagle: yojoe's suggestion is to standardize how the translations should be organized, which I totally approve of. From a developer's POV missing is, how to access these translations. That's where I suggested to standardize this by adding the above functions to the Core.

The developer just supplies the translation files (with the help of the community - handling see yojoe's suggestions) and then uses the following code:

Code:
load_i18n('myplugin');
// or alternatively load_i18n('myplugin', $language_from_my_configuration, $my_default_language);
...
i18n('PAGES'); // accessing standard GetSimple text
i18n('myplugin/MYTEXT'); // accessing plugin specific text

If we don't put this functionality into the Core, every developer has to copy or reimplement a similar function.
If this functionality is in the Core and the standards are described, he/she can't say "It's too complex - maybe later..."

BTW: I am willing to write the technical part of the wiki article. In the meantime let's try to figure out, how the process of providing translations should look like.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
unified directory for plugin translation files - by mvlcek - 2011-03-16, 17:41:02



Users browsing this thread: 1 Guest(s)