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
24 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 ...
  • 544
1 vote
0 answers
41 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
40 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
21 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)...
  • 568
0 votes
2 answers
42 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
25 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
18 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 ...
  • 568
-1 votes
2 answers
44 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
71 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
30 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
79 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
38 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
37 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
44 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 &...
  • 940
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
58 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
78 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
122 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.
  • 27k
2 votes
0 answers
40 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
111 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
58 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(...
  • 940
-2 votes
1 answer
116 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
40 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
55 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
51 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
48 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? ...
  • 27k
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
25 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 ...
  • 568
1 vote
0 answers
12 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 ...
  • 544
-2 votes
1 answer
26 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
318 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 ...
  • 27k
0 votes
0 answers
17 views

Can you add a node's translation to a different menu that the source node?

I would like to add a node's translation to a different menu than the node's source. Is that possible? For example, English is placed in main menu and french translation is placed in a different menu.
  • 23
0 votes
1 answer
57 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
58 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
0 answers
21 views

How can I load a translated version of my custom config? [duplicate]

I created a custom configuration form that can be translated into all available languages. My question is how we can get the translated version of the configuration for a specific language on the ...
0 votes
1 answer
65 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 "...
  • 940
0 votes
1 answer
161 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
288 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,747
1 vote
0 answers
28 views

URL aliases for non-translated content types revert to /es/node/nid in menu

I have Content Translate enabled and enabled translation on only our Projects content type. I've placed the Language switcher block on a Projects view and Project node page. This is working just fine. ...
  • 440
1 vote
2 answers
286 views

How get webform translations programmatically?

I'm on Drupal 9. I need to load the options labels of a Webform's option programmatically. So far, I've managed to load the labels: $element = $webform_submission->getWebform() ->...
  • 568
1 vote
1 answer
32 views

Machine-translate a node by menu link

I have an "About us" main-navigation menu link. I want to create several other main-navigation menu links, in languages other than English, which will link to that very webpage, for example: ...
  • 17
1 vote
1 answer
171 views

How to add link to translated content in text field

I need some help on a multilingual D9 site, trying to add links to translated node in text field. In German version should be a link to the English and French version of this node, as part of the node ...
  • 147
0 votes
1 answer
23 views

Multi-lingual Webform, not entire website

Our client does not need their entire website to be translated into multiple languages. However, they have a webform that provides a number of different languages in a dropdown, and would like the ...
  • 433
0 votes
1 answer
187 views

How can I get a list of all languages translation that a node has?

I'm trying to get a list of language translations that a node has in theme_preprocess_node(). I have the node object and can check for a translation on a one-by-one basis, if I have the list of ...
  • 1,037
2 votes
2 answers
139 views

Translation of a multilingual site into English

Note: This question is only focused on strings inside source files (PHP files). When you are creating a Drupal site in a non English country (let say France), you will create all your PHP files with ...
  • 544
2 votes
1 answer
133 views

How do I create multilingual user path aliases?

I'm setting up a multilingual site, and I need the user path aliases to be multilingual. Users are set up as translatable: Language Detection: URL (path prefix) English: /en Japanese: No prefix ...
  • 15.7k
1 vote
0 answers
19 views

Generate same Path aliases for multi languages

I have a content type Products. A pattern is defined via the Pathauto module for product CT. but my issue is that when I translate an entry/node it generates a translated path alias for Urdu in Roman-...
2 votes
0 answers
175 views

How to use a module-relative path to translations in .info.yml

I'm new to using Drupal and am building a custom module to learn how it all works. I'm building my module in modules/custom/my_module. I have a Dutch locale file in modules/custom/my_module/...
1 vote
1 answer
41 views

How can I tell, in hook_form_alter(), if a node form is for the node in its default language or a translation?

I'm implementing hook_form_BASE_FORM_ID_alter() in a custom module. I'd like to know if my form is for the node in its default language, or a translation of that original node.
  • 7,292

1
2 3 4 5
38