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
1 vote
0 answers
63 views

Is possible to get the latest default revision of a translatable node?

I'm on D10. The site has a content type, e.g. article, which is translatable and has a standard content moderation workflow (draft, published, archived). Given a node of that bundle, I need to find ...
Giuseppe's user avatar
  • 939
0 votes
1 answer
54 views

How get the default language of a translatable node bundle?

I'm on D10. I have a translatable content type, e.g. node, article bundle. How can I get programmatically its default language code, defined in the settings form? I've tried $entity_type_manager = \...
Giuseppe's user avatar
  • 939
2 votes
1 answer
53 views

How do I translate the default meta tags?

I dont see any option to translate default meta tags. Any tips? Admin url is at admin/config/search/metatag/taxonomy_term I am using metatag version 2.x
giorgio79's user avatar
  • 4,631
2 votes
1 answer
65 views

What is the purpose of the "Menu language" widget?

When the Content Translation module is enabled, a "Menu language" widget appears in the form for editing menus: What is the purpose of this widget? What does it do? It does not seem to ...
arnoldbird's user avatar
  • 1,193
1 vote
0 answers
50 views

Is it possible, with Twig Tweak or any other means, to place a menu block in a specific language?

I want to place a menu block in a template, but ensure it is always displayed in a specific language regardless of whether the content node where it appears is in that language. I do not ever want ...
arnoldbird's user avatar
  • 1,193
0 votes
0 answers
53 views

How can I prevent Drupal's translation functionality from changing a menu's links?

I have an about page at /about and a Spanish translation of the page at /es/about. However, when I visit /es/about, the links in my main menu all have /es prepended to the paths. How do I prevent ...
arnoldbird's user avatar
  • 1,193
1 vote
0 answers
43 views

Avoid URLs contain the language code when the used language is the default one

I select the user language with the language code in the URL, as in https://example.com/zh-hans/node/1 or https://example.com/mysite.com/en/node/1. The default language is Chinese. How could I manage ...
Brian's user avatar
  • 157
0 votes
0 answers
21 views

Translated taxonomy term pages are returning 403 errors

Even with the highest level of access (Super-Admin), the site displays a permission denied error when trying to edit the translation of certain translated taxonomy terms: [Translation: System Access ...
Harvey Johnson's user avatar
1 vote
1 answer
53 views

admin user interface language is changed to another user's preferred language

I have a weird situation. I as an admin have the preferred language set to English and I want to edit another user that has a preferred language set to something different (French for example). When I ...
Marius Ilie's user avatar
  • 3,072
-1 votes
1 answer
55 views

Fields/custom text show translated label for field

I am building a bilingual site with Drupal 10 and I am using views to show content items listings. In my views I am using field: Custom text to format the teasers of each item the way I want. I have ...
thanili's user avatar
  • 107
0 votes
1 answer
57 views

Translatable custom entity

Was there any significant change in how translatable custom entities are updated leading up to Drupal 10.1? There are a few questions here that deal with the question but it no longer seems to work. ...
Gábor's user avatar
  • 811
1 vote
0 answers
8 views

Limited languages choice on the creation of some type of node, not all

I inherited a Drupal 7 installation where I have a problem on a new node creation: on some types of node the SELECT language choice is limited to 3 languages, on one type the SELECT is empty, while on ...
Paolo's user avatar
  • 111
1 vote
2 answers
159 views

How can I display translated content by language?

I have a view with multiple displays, each configured as follows. Display 1: Articles FILTER CRITERIA: Content: Published (= Yes) Content: Content type (= Article) PAGE SETTINGS: Path: /articles/...
Happy Coder's user avatar
2 votes
1 answer
58 views

How can I get the untranslated field value from a translated paragraph?

Normally you can't have different paragraph items per language so I simply want to hide selected paragraphs depending on a field value in the paragraph. I added an untranslatable list field listing ...
leymannx's user avatar
  • 18.1k
0 votes
1 answer
74 views

Multilanguage View path translation

I'm building a multilanguage site and I have a View of taxonomy terms with the following configuration when I hover the menu Wines I can see the /en/products link, that's perfect when I switch to my ...
TeslaZap's user avatar
0 votes
0 answers
17 views

Why many empty revisions are created via JSON:API?

I'm a D9.5.x site. I've a content type with content moderation and content translation enabled and configured. That content type has also a paragraph field. Despite this kind of setup not being ...
Giuseppe's user avatar
  • 939
0 votes
2 answers
263 views

How to get translated menu link entity

I have a headless Drupal 9 solution and I'm currently working on i18n of the whole site. I've managed to do everything except menus. The content translation core module is installed and setup ...
frajer's user avatar
  • 1
2 votes
1 answer
54 views

How to localize your own contrib module

Things have changed since I last localized a Drupal contrib module of mine. In D9/10, having a translations folder with .po files no longer seems to be the usual route. Yes, it can be done for local ...
Gábor's user avatar
  • 811
0 votes
0 answers
45 views

custom block field not translatable [duplicate]

i have created a custom block <?php namespace Drupal\amu_external_search_block\Plugin\Block; use Drupal\Core\Block\BlockBase; use Drupal\Core\Block\BlockPluginInterface; use Drupal\Core\Form\...
Matoeil's user avatar
  • 3,429
1 vote
1 answer
117 views

How to create entity translations using JSON:API or REST API?

I working on a headless localized site in which entities need to be synced regularly from an external source. During the sync process, I need to create new entities and their associated translations. ...
nstCactus's user avatar
  • 152
0 votes
1 answer
481 views

How to get path/URL without language prefix (for multilingual site)

I have written a code to get the parameters (node_id, taxonomy_id) from the URL using the following code. Sample URL: /foo/bar/[nid]\/[tid] $path = \Drupal::request()->getpathInfo(); $arg = explode(...
Krishna Mohan's user avatar
0 votes
1 answer
234 views

Url-aliases or redirect without language prefix

How can I use url-aliases in additional languages without the language prefix? From his old homebrew-CMS, my client has the following URLs: example.com/english-page => redirecting to example.com/...
mullzk's user avatar
  • 65
1 vote
0 answers
41 views

When adding translations in twig, is the source language always English?

When adding translatable strings in Twig templates, is it assumed that the string is always written in English and then translated to other languages? Even if there is a different 'base' language or ...
tanc's user avatar
  • 390
0 votes
1 answer
47 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 ...
Kathryn Carruthers's user avatar
2 votes
1 answer
146 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 ...
Baud's user avatar
  • 532
3 votes
0 answers
90 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 ...
MilanG's user avatar
  • 539
0 votes
0 answers
70 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 ...
liquidcms's user avatar
  • 1,268
1 vote
1 answer
142 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 ...
Benoit's user avatar
  • 13
1 vote
0 answers
26 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 ...
techenzie's user avatar
1 vote
1 answer
113 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>'...
donbuche's user avatar
0 votes
1 answer
186 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 ...
Ivan Ginovski's user avatar
0 votes
1 answer
49 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 ...
Baud's user avatar
  • 532
1 vote
0 answers
63 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 /...
Stéphane JAULIN's user avatar
0 votes
1 answer
52 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 ...
John's user avatar
  • 31
0 votes
2 answers
75 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 ...
David Pugh's user avatar
0 votes
1 answer
30 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 ...
Bavramor's user avatar
-1 votes
2 answers
60 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 (...
rottermann's user avatar
0 votes
1 answer
271 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 ...
Dharmesh Sojitra's user avatar
0 votes
1 answer
231 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.
Vincent's user avatar
1 vote
1 answer
513 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 ...
Vik Durve's user avatar
0 votes
1 answer
98 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 ...
johndoe555's user avatar
0 votes
0 answers
88 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", "...
Eric STOCLET's user avatar
0 votes
0 answers
170 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 &...
liquidcms's user avatar
  • 1,268
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 ...
JAyenGreen's user avatar
0 votes
1 answer
266 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 ...
Bavramor's user avatar
0 votes
1 answer
40 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 ...
khaled alsamman's user avatar
1 vote
1 answer
321 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 ...
Johannes Freudendahl's user avatar
0 votes
1 answer
340 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.
Kevin's user avatar
  • 27.8k
2 votes
0 answers
66 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 ...
Morten Najbjerg's user avatar
1 vote
0 answers
489 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, ...
Johannes Freudendahl's user avatar

1
2 3 4 5
39