Questions tagged [i18n-l10n]

Use it in questions about adapting software to different languages, regional differences, and requirements of a target market (locale).

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

With English, French and Spanish enabled. Recently our Comms folks can't add translations

We're using Drupal 9.4.10 - turned on content translation for the Comms role for all content types, URLs, etc. but that role cannot create translations for any content type. They can edit the ...
0 votes
0 answers
13 views

Translate ajax form config

I have created a form where a user has the possibility to add as many section as he want (via ajax), each sectionhas a field (1 field to make it simple). My question is related to multilingual website,...
  • 101
2 votes
1 answer
98 views

How to display translated fields labels of a node view

I would like to display a node in NL. This node is not translatable but I would like to have the fields labels translated in NL. This rendering occurs in a cron job and is used to render an email in ...
  • 448
0 votes
0 answers
22 views

How to translate the workflow labels defined in mymodule.workflows.yml (used by the state_machine module)

If you are using the state_machine module, you will end up with a yaml file named mymodule.workflows.yml which contains all the labels of your workflows's states and transitions. Here is an extract: ...
  • 448
3 votes
0 answers
41 views

Where do you put install config translations?

I have a Drupal 9 site. When I export site config (drush cex) I get config/sync dir with settings and inside it I have i.e. language/de where translation config is stored. So translations are in ...
  • 485
0 votes
0 answers
62 views

How to render alternate language page (with paragraphs)?

I have code running from a hook_node_update which renders the full content so that I can parse the result. $view_builder = \Drupal::entityTypeManager()->getViewBuilder('node'); // Drupal fails ...
  • 1,008
0 votes
0 answers
24 views

Translation destination email handler

I have a multi-language site with a webform contact form. Everything works, I can setup different translations, shows perfectly. I want to however change the "to" address per language. When ...
  • 173
1 vote
1 answer
46 views

path alias OK for default language, but no alias for others

My site is in D9, mainly in French, with some pages in English. I have an old page (note 553 written in D6 in 2017), which can be correctly accessed in French with https://mysite/myoldpage and in ...
  • 13
1 vote
0 answers
21 views

Why is my translated content loaded on a 'raw' node address even when there is an alias given? (Multilingual Site)

I have two languages (English and Spanish) in my Drupal site. The default language (English) content has already been created and now I need to translate the content (articles/pages/blocks) into ...
1 vote
1 answer
42 views

How to translate a link defined in javascript with Drupal.t()

I have a template string that contains a link, which I want to translate afterwards throught the Drupal UI: var html = `<p>${Drupal.t('<a href="/node/16">Check this out</a>'...
0 votes
0 answers
23 views

Multilingual site translate languages label for the language switcher

I have a Drupal 9 site with 2 languages, English and French; French is the default language. Initially, on /admin/config/regional/language, the visible labels are French and English. When I click on ...
0 votes
0 answers
33 views

How to enable translations based on domain and path both

I wish to apply both, path and domain based translation rules to my drupal website. For example, mysite.com/jp should result into Japanese language mysite.jp should also result into Japanese language ...
0 votes
1 answer
91 views

How to translate breadcrumbs block via drupal_block() in twig?

I am trying to translate the breadcrumbs block in Drupal 9.3 via Twig Tweak I am loading the block in a twig like so: {{ drupal_block('system_breadcrumb_block') }} If I leave it like this, it only ...
0 votes
1 answer
30 views

How to bulk change the source language of field labels?

I have a French Drupal site that needs to be translated into English and Dutch. My question is only about the translation of the content types fields (label/description/...) which are configuration ...
  • 448
1 vote
0 answers
50 views

How do I force the language prefix to the current langcode on node with "Not specified" language?

I have a multilingual site whose default language is Italian. Some of the content has no language defined. The problem occurs when I browse the site in English. All the links are displayed with the /...
0 votes
1 answer
41 views

Add/enable language to Language Module from code

I'd like to add/enable a language, just like one would from the admin ui at /admin/config/regional/language/add but, from code. I've found old options such as locale_add_language which no longer ...
  • 31
0 votes
0 answers
26 views

How get the language the current language for a REST request considering detection\selection settings?

I'm on D.9.4.x. I'm writing a custom REST resource and I'd need to get the "current language id", in compliance with the "Detection and selection" site's settings (screenshot below)...
  • 645
0 votes
2 answers
47 views

Saving block translation with large amount of text causes PDOException: Data too long for column 'translation'

I have a Drupal 7 project where I am using a Panel to patch together some Drupal blocks. These blocks have to be translated and I just added some data to the current French translation and apparently ...
0 votes
1 answer
26 views

Menu items are displayed differently

I have a multilingual page with the languages Spanish and English. When I edit the menu items in the backend, my default or original language is English. Now the menu links in this menu are always ...
0 votes
0 answers
28 views

How edit moderated and translated content?

I'm on on a D9.4.x clean installation, and I am having inconsistent behavior when trying to editing and change the moderated state of a content type which is also translatable in EN and ITA. If I try ...
  • 645
-1 votes
2 answers
51 views

How can I translate Olivero default search string? [closed]

In the default theme for Drupal 9 (Olivero) I have the following string in my search box field: Search by keyword or phrase. I have tried to change it by going to admin/config/regional/translate (...
0 votes
1 answer
106 views

Deleting the original content doesn't delete translated one [closed]

When I delete original content, the translated one isn't delete and I just can't delete it ("remove" button doesn't appears). These are the steps to reproduce the issue. Install the ...
0 votes
1 answer
67 views

How do I import local po files?

There is no /admin/config/regional/translate/import page in Drupal 9 now, which exists in Drupal 7. So I don't know how to import manually translated PO files.
1 vote
1 answer
169 views

How do I translate a custom string in "Global: Custom text"?

In D9 website I have a view with Global: Custom text field. In that field I have placed a string like this: <span class="general-info">{{ 'General Info:'|t }}</span> I want to ...
0 votes
1 answer
54 views

Use translations with nl2br in template

Is it possible to use translations with nl2br? I tried {{ "This offer may \n interest you"|nl2br|t }}, but it doesn't translate the string because it contains a '\n' character. I already ...
0 votes
0 answers
48 views

REST API : how to post a content in multiple langage

I'm trying to POST a multilingual content like this : POST : $URL/node?_format=json { "type": [ { "target_id": "movie", "...
0 votes
0 answers
63 views

What impacts "revision_translation_affected"?

I have seen this in the code comments: If a translation has changes in a certain revision, the translation is considered "affected" by that revision, and will be flagged as such via the &...
  • 1,008
0 votes
0 answers
18 views

Correct translation settings for simple setup

In D9, I am trying to set up simple translation but am having 2 issues. The site is English with Spanish as the alternate language. We're using the Dropdown Language selector. The content types and ...
0 votes
1 answer
93 views

Always keep admin UI in the same language when translating content

I have set up a page with two languages (English, German). I have two users, one should get the German backend and the other user only understands English, he should get the English backend. The ...
0 votes
1 answer
35 views

using 2 language switchers in the same node

So i am not sure if this is doable or not, I am trying to add 2 language switchers block to the same node. I would like to have one language switcher for my content type that will be in charge of ...
1 vote
1 answer
127 views

How does importing a contrib module's translations work?

Drupal version: 9.3.13 Basically, I'm trying to understand how using a contrib module's translation works. I want to be able to download and use the translations from the Drupal infrastructure, and ...
0 votes
1 answer
171 views

Set a <front> page for different languages?

Is there a way to specify the front page per language of a Drupal 9 site? I am looking for an interface that allows this to be set by a user.
  • 27.2k
2 votes
0 answers
48 views

How can I provide language-aware URL patterns for Pathauto?

I am using this pattern in Drupal 9 Pathauto to generate URLs: [node:menu-link:parents:join-path]/[node:menu-link] This does however not seem to work when using translated content. The generated URL ...
1 vote
0 answers
191 views

Field Label Translation not working

I have a Drupal 9 site. The default language is English, second language is German. I keep having problems with translations in the backend. Lots of field labels and other text shows up in English, ...
1 vote
1 answer
88 views

What is the correct way to set language used by a modal form?

I have a button linked through a controller to open a custom form in a modal: The controller callback is: /** * Callback for opening the modal form. */ public function openShareLinkModalForm(...
  • 1,008
-2 votes
1 answer
201 views

how to set Default translated texts in twig file [duplicate]

I developed a twig plugin (to display graphs from a webform). These plugins contain English texts; And I want the same file to keep translations for several languages by default (for example, Arabic), ...
0 votes
1 answer
48 views

Can't save field translation

I have 2 languages on my site (English and Russian). I also have a content type "Home page" and some fields are translantable (configured in admin/config/regional/content-language) After ...
  • 1
2 votes
0 answers
79 views

How to show content that is not yet translated (Untranslated Content)

I am fairly new to Drupal – spent the last 3 months getting to know my way around. I have one question. I have to create a multi-language site for English and German users. I'm the site administrator ...
  • 21
0 votes
1 answer
71 views

Views Block Language Detection

I have a site with two languages (EN/FR). I have a Content Type (Article). I have a Block built with Views that is displayed on the Article Node page. This Views Block has a translation. When the user ...
  • 586
0 votes
1 answer
52 views

Allow module configuration per language

I have a module that lets site editors enter plain text title and description for a sitewide element. This site supports several languages - how can I enable entering values for each enabled language? ...
  • 27.2k
0 votes
2 answers
27 views

How to translate front but keep admin in FR

I have a website with translation by domain, ex : monsite.fr fr.monsite.ca en.moniste.ca ... But in admin i'd like to stay on monsite.fr/admin whatever content that i translate, is it possible ? ...
1 vote
0 answers
31 views

Views: how show a link to the translated entity?

I'm on D9. I've a View of moderated content nodes, so of Content revisions elements. Those nodes are also translatable: the default language is it and the eventual translation is en. The views ...
  • 645
1 vote
0 answers
13 views

Unwanted fields added to translation

I have a node with only 2 fields to translate (regular fields, not paragraph fields). When I create a translation job (with tmgmt), I got those 2 fields (nice) and 2 others coming from a non ...
  • 448
-2 votes
1 answer
29 views

How can make a string used by a view translatable?

I have a Events view that is added from the Fullcalendar View module. Is there a way to translate specific strings used from that view?
  • 67
1 vote
1 answer
390 views

Dynamic language links from menu?

I am trying to find a way to do the following: Add languages to Drupal 9 menu items Translate content/menu links Provide (from the Main Navigation) a list of languages the current page is translated ...
  • 27.2k
0 votes
1 answer
81 views

How set html 'lang' to match node 'langcode'?

I would like to change a node's html 'lang' from site's default to the node's 'langcode'. For example, if I create a node and while creating I select French as the language, I would like the page's ...
  • 23
2 votes
0 answers
94 views

How to publish latest revision langcode programmatically in each translation

My workflow is draft, publish and archived. My translations are 'en(default)', 'fr', and 'de'. My clients create a lot of nodes in draft status for their release. We must release these latest ...
0 votes
1 answer
79 views

Is it possible to render a View based on the Content language?

Drupal supports the concept of Interface Language and Content Language. I (and every client I have ever asked) seem to have a different opinion of what is "content" and what is "...
  • 1,008
0 votes
1 answer
302 views

Drupal 9 core multilingual: cannot translate main navigation menu - button translate missing on menu items

I'm trying to catch multilingual features of Drupal 9 and have wamp64 local development server and clean Drupal 9.2.8 install. I've enabled 4 multilingual core modules: Configuration Translation, ...
1 vote
1 answer
388 views

How to translate the layout builder blocks of a node programmatically?

I am translating the nodes programmatically. Everything works fine except the layout builder blocks. When I try to translate it, it also changes on the source node. I have created a node in language ...
  • 2,765

1
2 3 4 5
39