title tags in language menu

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

title tags in language menu

Post by svasti » Mon May 19, 2014 2:42 pm

Mouse over on one of the flags of the language menu produces only "nl" or "de" or "en" etc.
Would be nice to have "Deze site in Nederlands" or "Diese Site auf deutsch" or "This site in English".
I suggest for 1.6.3 to add some kind of language variable like $tx['menu']['languagelink']

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: title tags in language menu

Post by cmb » Mon May 19, 2014 2:57 pm

Good idea. We have to consider, whether we'll use this new language string also for the links, when the language flag icon is not there. I suggest to do so.

I've put it on the roadmap, BTW.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: title tags in language menu

Post by cmb » Tue Jul 01, 2014 1:57 pm

Um, after reconsideration I have to admit that a single language string won't help. If the visitor is on the English page, only the English language string is readily available, but this isn't actually necessary. Instead we'd need the other language strings (say, German and Danish). Reading all other language files would be possible, but I don't like the idea (mainly for performance reasons). Another option would be to have all translations in a combined language string (say, $tx['menu']['languagelink']), but that would require the user to enter duplicate information (always hard to maintain).

For Polyglott_XH I had solved this issue with a single config option:

Code: Select all

$plugin_cf['polyglott']['languages']="en=English;de=Deutsch"
I'm not sure though, if we should do this for the core. :?
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: title tags in language menu

Post by svasti » Tue Jul 01, 2014 6:38 pm

cmb wrote:

Code: Select all

$plugin_cf['polyglott']['languages']="en=English;de=Deutsch" 
It seems that is the way to do it & I guess, we should put it into the core. As multilanguage capability is part of the core, this also should be part of the core.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: title tags in language menu

Post by cmb » Tue Jul 01, 2014 6:48 pm

svasti wrote:As multilanguage capability is part of the core, this also should be part of the core.
I have to agree that we have languagemenu() so we should have a sensible internationalization option for it.
svasti wrote:It seems that is the way to do it
What about the delimiter characters (; and =). Do we have to provide an escape mechanism if a user wants to use these characters for his localization? Probably it's not necessary, but I'm not sure.
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: title tags in language menu

Post by Tata » Tue Jul 01, 2014 8:18 pm

svasti wrote:Would be nice to have "Deze site in Nederlands" or "Diese Site auf deutsch" or "This site in English".
I am not absolutely sure if this wouldn't be a little confusing. Stating "This is in English" (or any other language). I made a couple of websites, where the 2nd language had not always exactly the same content. Stating e..g. "This is in English" would imply that the :English: is the exact trannslation of 1st language. On my mentioned pages the EN and GE variants hade reduced content and also reduced TOCs.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: title tags in language menu

Post by cmb » Tue Jul 01, 2014 8:36 pm

Tata wrote:Stating e..g. "This is in English" would imply that the :English: is the exact trannslation of 1st language.
Therefore the idea is to make it user configurable. So a user could simply define the title as "English", "English Site" or even "English (not fully translated)" or whatever is appropriate. Anyway, it seems to be more descriptive as "en" (consider visually impaired users, who cannot see the images).
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: title tags in language menu

Post by svasti » Tue Jul 01, 2014 8:42 pm

Tata wrote:This is in English" would imply that the :English: is the exact trannslation of 1st language.
true, but now the plan is simply English flag-> title tag: English, Dutch flag-> title tag: Nederlands, etc. It doesn't say anything about the contents. Only the language is stated.
cmb wrote:What about the delimiter characters (; and =)
I think, you decide.

Another point: These language names could give us the possibility, to use the names instead of flags, or the names together with the flags... kind of useful as many languages don't correspond to exactly one flag/country. Maybe also alternative flag icons could become possible?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: title tags in language menu

Post by cmb » Tue Jul 01, 2014 9:20 pm

svasti wrote:I think, you decide.
Agreed, if we don't discuss it, the implementer has to decide (whoever that'll be--I'm looking forward to see some volunteers).
svasti wrote:These language names could give us the possibility, to use the names instead of flags, or the names together with the flags... kind of useful as many languages don't correspond to exactly one flag/country. Maybe also alternative flag icons could become possible?
Currently it's possible to remove the flag icon, and then the there'll be [de], [en], for instance. We may omit the brackets, when there are full language strings. Alternative flag icons can already be used by replacing the icon in $pth[folder][flags]. We may consider switching to PNG images in the not too distant future (GIFs are fine for the small icons, but larger icons, such as on my website, are looking much better in PNG format due to the restriction on 256 colors for GIF and the horrible dithering to mitigate the restriction).

Not sure, if we should go further (e.g. allow text and image). I assume that less then 10% of all CMSimple_XH sites actually are multilingual, so that would require further config options that might be useful for very few users. And after all, that could also be done by a plugin.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: title tags in language menu

Post by svasti » Sat Jul 05, 2014 10:27 pm

Thinking about how it could be done ... It seems to me that it would have to go into the config,
hm, what about:

Code: Select all

$cf{'language']['2nd_lang_names']="cs=Čeština;da=Dansk;de=Deutsch;en=English;es=Español;fi=Suomi;fr=Français;gr=Ελληνικά;hu=Magyar;it=Italiano;nl=Nederlands;no=Norsk;pl=Polski;ru=Русский;se=Svensk;sk=Slovenčina";
I would simply hide it, that would be the simplest solution. Otherwise the cms get inflated with another config option --- this makes life complicated.
cmb wrote:Therefore the idea is to make it user configurable.

$mcf{'language']['2nd_lang_names']="function:XH_lang_names"; where the user selects a lang 2 letter symbol and gets a preset input field which can be changed.
Last edited by cmb on Wed Aug 13, 2014 2:14 pm, edited 1 time in total.
Reason: fixed markup

Post Reply