lajax/yii2-language-picker

Dropdown always down causing picker to be unusable in footer

Closed this issue · 1 comments

Your extension does not detects its location against entire page and always displays down version of dropdown / menu. This renders it to be not usable in footer:

lang-1

Are you willing to fix this, as it is done in for example Bootstrap, which is able to detect location of master object in page flow and display drop-up in this case?

This bug is only partially solved. Solution provided by you works just perfect, if there are three or more languages in application:

yii-l-p-1

But fails as previously, if there are only two:

yii-l-p-2

Additional things to consider:

  1. You should either remove title attribute generation at all, put full language name into it (if exists -- i.e. user is using associative array with language names as array values) or introduce some configuration option to let user control this behavior (something like showLanguageCodeInTooltip: set to TRUE gives current effect, set to FALSE displays full language name, if given and set to NULL causes to not render title attributes for links at all). Current implementation, that shows only language codes as tittle seems pretty useless and produces over all bad feel & look in my opinion.
  2. You should consider if it is worth introducing another configuration option, that would user decide, if picker should render itself at all, if there is only one language in configuration array -- that is: there is no language to change to.

Second one could be considered as separate issue, a feature request, If you share my thoughts.