i18n of Config Keys

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

i18n of Config Keys

Post by cmb » Sat Sep 01, 2012 3:44 pm

Hello Community,

IMO the internationalization should be extended to include the config and language string keys in CMSimple_XH 1.6. Currently $cf['language']['default'] is displayed in a German admin back-end as:
Language
Default
That would better be something like
Sprache
Standard
This could be done by adding language strings in the line of:

Code: Select all

$tx['key']['language']="Sprache";
$tx['key']['default']="Standard";
Please note, that this might cause a slight performance loss, but should greatly enhance the usability for non English speaking users.

Any comments, suggestions and improvements are welcome!

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1649
Joined: Wed Dec 17, 2008 5:08 pm
Location: Bielefeld, Germany
Contact:

Re: i18n of Config Keys

Post by svasti » Sat Sep 01, 2012 7:04 pm

A good idea to change this. But if we change this, we could go a step further and hide settings which should not be changed.

cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: i18n of Config Keys

Post by cmb » Sat Sep 01, 2012 7:13 pm

svasti wrote:we could go a step further and hide settings which should not be changed.
Yes, of course. We have to consider how this is best done. But this has still time -- for now we should concentrate on 1.5.4, the documentation and the demo (among others).
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1649
Joined: Wed Dec 17, 2008 5:08 pm
Location: Bielefeld, Germany
Contact:

Re: i18n of Config Keys

Post by svasti » Sun Sep 02, 2012 9:27 am

Of course this is for 1.6. We could go one step further and give the user radio buttons/checkboxes/select menus, instead of "archaic" true/false entries.

cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: i18n of Config Keys

Post by cmb » Sun Sep 02, 2012 11:31 am

svasti wrote:We could go one step further and give the user radio buttons/checkboxes/select menus, instead of "archaic" true/false entries.
I see, there's still much to improve. I've put both ideas on the roadmap to 1.6 so we don't forget about it.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: i18n of Config Keys

Post by cmb » Sat Nov 24, 2012 6:06 pm

Hello Community,

I've thought again about the internationalization of the config keys. We should consider to go a step further and internationalize the keys of the language texts also.

This could be done similar to the "typed" config options to stay compatible with older plugins offering no such translation.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 722
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: i18n of Config Keys

Post by manu » Fri Dec 21, 2012 8:47 am

Therefore do we introduce a new field type "hide/hidden" in metaconfig.php?

cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: i18n of Config Keys

Post by cmb » Fri Dec 21, 2012 9:33 pm

That might not be necessary. If the variables/keys containing the translation of the config/language keys can be automatically identified as such, they simply can be automatically hidden.

BW: the translations of the config/language keys can be done in the files manually, or with a separate translation tool (e.g. Translator_XH).
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: i18n of Config Keys

Post by cmb » Sat Jan 05, 2013 9:11 pm

manu wrote:Therefore do we introduce a new field type "hide/hidden" in metaconfig.php?
I guess I've got your idea wrong in the first place. You were probably not referring to the i18n of the config/language keys, but rather to the possibility to hide some of the config options. If so, that's a great idea! Easy to implement (based on XH_FileEdit and its subclasses only a few lines) and extremely flexible (based on the metaconfig the webdesigner/webmaster can choose for himself, which fields he wants to be able to edit in the back-end!).

I have implemented this as r421. One can test it with the following plugins/pagemanager/config/metaconfig.php:

Code: Select all

<?php

$plugin_mcf['pagemanager']['utf8_marker']="hidden";

?>
Note that even the category is "hidden", when all fields in the category are of type hidden.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 13228
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: i18n of Config Keys

Post by cmb » Fri Jun 14, 2013 3:44 pm

Hello Community,

I have implemented the internationalization of the config and language keys for the core and for plugins(r620). The localizations are contained in files metaen.php, metade.php etc. For now I only made the localization for the core config and a few language keys in German. Keys that are not contained in the files (or if there is no file at all) are simply displayed as is (ucfirst()d, to be exact).

Please have a look at it; particularly the mapping from keys to translations might be too simple, as there is some overlap. And it's not clear to me, if it's reasonable to translate most language keys at all, as the translation itself should be enough to identify its purpose. However, having all keys translated doesn't hurt, as the meta files are only read for the config and language forms, but it's a lot of work to translate all these keys (and keep them in sync with later changes).

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply