{% set admin = block_context.settings.admin %} {% if admin.class is translatable %} {% set object = block_context.settings.object %} {% set object_id = object ? admin.id(object) : null %} {% set locale_switcher_route = block_context.settings.locale_switcher_route|default(object_id is not null ? 'edit' : 'create') %} {% set locale_switcher_route_parameters = block_context.settings.locale_switcher_route_parameters %}
{% apply spaceless %} {% for locale in sonata_translation_locales %} {{ locale|localeName(app.request.locale) }} {% endfor %} {% endapply %}
{% endif %}