Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jan 2008 at 16:22 UTC
Updated:
28 Jan 2008 at 09:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
hass commentedFound one more...
Comment #2
gábor hojtsyFixed the second case in the patch to say <= 5 (it said <= 4), and committed that, thanks.
Comment #3
hass commentedNo, this is wrong... in the second case the number 4 was correct. In the first - 5 is correct. With 4 - the English language is not in the language array and is added extra. Therefor your change cause now to show the select only if your site have 6 languages (including english)...
See here - this requires the number "4":
'#options' => array_merge(array('all' => t('All languages'), 'en' => t('English (provided by Drupal)')), $languages),Comment #4
gábor hojtsyHm, actually from the looks of the code, *two* additional language options are added, not one. Right?
Comment #5
hass commentedYes, but
$languagescontains an array of languages without'en' => t('English (provided by Drupal)')). Check it out :-). The patch switches to select box if you have 5 languages, what are 6 radios... 5 languages + 1 item with "all languages". i tried to switch after 5 languages to select box and not after 5 radio items. Looks better and is more consistent in UI.Comment #6
gábor hojtsyUh. It does not contain English, and it adds one more, so that's why we should do <= 3 to have the same effect: dropdown if more then 5 options, right?
Comment #7
hass commentedWell, we could do this at 3, if we'd like to switch at 5 radio items, but i think we should only change to select if more then "5 languages" as we do in l10_server and on the user/x/edit form. I know it's an exception to the switch at 6 radio items, but i think this is more consistent not to sum up the "all language" item together with the 5 active languages... i leave this to you.
Comment #8
gábor hojtsyOK, committed a fix to have this at 3 + 2 = 5 options (not 5 languages). BTW l10n_server does the switch after 3 languages already, so it is not a good reference :) Also, core should not adhere to contrib module practices, when it comes to consistency, and we can do better here.
Comment #9
hijas commentedi want to set my languages in select box..... plz help... iam using arabic and english language
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.