'Language menu layout
options for each entry:
- lang_code: the language code
- lang_name: the language name
option for the menu
- current_language: code of the current language'

@staticmethod
def layout(item):

    if item.enabled:
        if item.components:
            current_language = current.T.accepted_language
            items = item.render_components()
            select = SELECT(items, value=current_language, _name='_language', _title='Language    Selection', _onchange="S3.reloadWithQueryStringVars({'_language':$(this).val()});")
            form = FORM(select, _id='language_selector', _name='_language', _action='', _method='get')
            return form
        else:
            return OPTION(item.opts.lang_name, _value=item.opts.lang_code)
    else:
        return None
