New answers tagged

0

You should install module 'currency', add a field of type Entity reference, and choose the 'currency' as the referred type.


0

User preferred language is Chinees (zh-hans). When I am logging into site URL does not have language prefix. While switching the language on dropdown language for all the langauage its getting translated as expected. When I am switching the language to English (Site Default Language) and its remain as user preferred language. Note: I am using ...


1

To have the "Translate" tab listed on your module's configuration page you additionally need to provide a module_name.config_translation.yml in your module's root. module_name.settings: title: 'Module Name' base_route_name: module_name.admin_settings names: - module_name.settings Look for existing module_name.config_translation.yml file in core ...


0

There is no solution out of the box yet. There are two features that are not realised at the same time. The Paragraphs EXPERIMENTAL widget by the Paragraphs module provides for a drag & drop mode mode The Paragraphs Classic Asymmetric widget from Paragraphs Features module provides the functionality of asymmetric translation There is no Paragraphs ...


0

@IgorTengab An entity in Drupal 8 needs translation to be enabled to be translatable For example by going to /admin/structure/types/manage/ENTITYNAME > language settings > enable translation For more info look here But for your purpose perhaps a light-weight alternative would be to create a custom entity https://www.drupal.org/docs/8/api/entity-api/create-...


0

Seems you can do what you want with Url options and a language object like following. // Get all activated languages. $languages = \Drupal::languageManager()->getLanguages(); foreach ($languages as $language) { // Get the current URL in each language. $url = \Drupal\Core\Url::fromRoute('<current>') ->setOption('language', $language)-&...


1

In page.html.twig and Drupal 8.7.6, I had to use: {% if language.id == 'en' %} or {{ language.id == 'en' ? 'active' : 'not-active' }} Other suggestions did not work.


Top 50 recent answers are included