By danny_joris on
Hi all,
I'm building a bilingual website containing Dutch and French. Right now, I have Dutch, French and English enabled as languages. I want English only to be the language for me as an administrator. So far, when I make new content for example, this can still be translated in all 3 languages. I want the content only to be in Dutch and French. I don't want English anywhere to appear in the website's content. Right now, the language switcher on the front page lets me still select between Dutch, French and English.
Any ideas?
Thanks in advance,
Danny
Comments
_
I don't believe you can do this through the ui, but you should be able to hook_form_alter english out of the available options on the node edit form.
_
I'll have to teach myself on that. Maybe I'll make this a feature request as well.
Thanks for your advice, Worldfallz.
Cheers,
Danny
--EDIT: Maybe it's something close to this, but I still wouldn't know what to do. http://drupal.org/node/446132
Maybe changing language_default(); to some function that calls 'English'?
--EDIT2: I added two issue's: http://drupal.org/node/568660 and http://drupal.org/node/568646
_
Hmm, after hours of searching, I stumbled upon this: http://www.lullabot.com/articles/modifying-forms-5-and-6
Very nice. It's the only good explanation about hook_form_alter() that I've seen so far.
I build a little module and added this:
The funny thing is that it takes away [en] => English in the list generated with return print_r($form);
Exactly what I wanted, but the 'English' option was still there! I don't understand that.
On the side. Even if I'm able to hide the 'English' option, I will still have to hide the 'English' option in the 'Translations'-tab of the node. But maybe that will be not difficult if I succeed in hiding this one. There is an English flag popping up somewhere in the language switcher, but I can hide that with css very easy.
Cheers,
Danny
--EDIT: I don't know if there's any vulnerable information in this screenshot, but it shows my problem very well. I was able to cut out the [en] => English part, but in the form it still shows that option in the list.
http://www.dannyjoris.be/files/fora/hook_form_alter.jpg
_
I just moved this topic from Post Installation to Module Development, because I think the solution to my problem is getting quite technical.
I also pointed out my problem here: http://www.lullabot.com/articles/modifying-forms-5-and-6#comment-6638
Many thanks in advance.
Cheers,
Danny
Simple Solution!
For those who don't want a certain language to be displayed, you can do the following:
#block-locale-0 .en {
display: none;
}
just copy paste it into the .css file in "themes-->your theme-->css folder--> blocks.css" (well at least in my case). In this case the English (.en) language won't be displayed. You can do it with any other language.
If you don't want the current language to be displayed, you can do the following:
#block-locale-0 .active {
display: none;
}
Hope it helps.