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
33 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
40 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
48 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
38 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
  • 801
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
103 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
38 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
  • 17.8k
0 votes
1 answer
44 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
13 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
  • 897
0 votes
2 answers
78 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
51 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
  • 801
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,355
1 vote
1 answer
64 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
  • 153
0 votes
1 answer
236 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
0 answers
127 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
29 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
41 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
0 votes
0 answers
18 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,...
Hanane's user avatar
  • 101
2 votes
1 answer
125 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
  • 570
0 votes
0 answers
30 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: ...
Baud's user avatar
  • 570
3 votes
0 answers
77 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
  • 499
0 votes
0 answers
67 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,224
0 votes
0 answers
48 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 ...
mauzilla's user avatar
  • 173
1 vote
1 answer
122 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
24 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
82 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
0 answers
32 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 ...
user avatar
0 votes
0 answers
48 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 ...
ABHISHEK Joshi's user avatar
0 votes
1 answer
148 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
43 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
  • 570
1 vote
0 answers
59 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
46 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
65 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
27 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
54 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
227 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
186 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
404 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
79 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
77 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
129 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,224
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
203 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
257 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
290 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.7k
2 votes
0 answers
61 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
400 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 vote
1 answer
164 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(...
liquidcms's user avatar
  • 1,224

1
2 3 4 5
39