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
-2
votes
0answers
23 views

I have a bilingual site and I want to configure pages in a language to be accessible without language prefixes

My site uses English as default language. I created an About page and translated it into Romanian. If I want to access the page in English I enter https://example.com/about, but when I want to access ...
0
votes
0answers
23 views

How can I delete a field translation in node?

I am using a complicated melange of paragraphs with asymmetric translation, and in a few my nodes there is a stubborn translation that somehow is stuck. Its a node that used to be translated, but then ...
0
votes
0answers
18 views

Multiple translations of Paragraph content - EN / ES work, FR displays EN

I have gone through the documentation several times and started from scratch with a new EN node, translated Body and Accordions to ES (works!), then back to the EN, Translate, FR, add all the same ...
1
vote
0answers
26 views

Configuration export via drush randomly change the value of labels\other content in multilanguage sites

I've a multilanguage site, with Italian set as default and English as secondary language. When exporting the configuration via drush - drush cex command - sometimes the labels of other kind of content ...
0
votes
0answers
12 views

“created date” issue with multiple languages

I am working on a site with 3 languages: English, Finnish, and Swedish. The default language is Finnish; the site is using English and Swedish translations. I sent a request to Drupal with Postman ...
0
votes
1answer
39 views

How to use addTranslation() on an entity's multi-value paragraph?

I'm trying to programmatically update a multivalue paragraph field and add a translation. In the code below field_product_description is the paragraph's field that I'm updating and ...
0
votes
0answers
20 views

How can I create a Node Paragraph's image translation programatically?

I'm trying to create a translation on a node's paragraph field whose paragraph contains a text field and an image field. The code below updates the text field as expected but the image field is always ...
2
votes
1answer
46 views

How do I set a Node's Paragraph field in a different language programmatically?

I have a node that has different translations already and I'm trying to populate Paragraph fields in different languages programmatically. I can edit the node and update the paragraph fields manually ...
0
votes
0answers
11 views

Translation doesn't load other languages

I installed the Entity Translation and the Webform Translation modules. I enabled the webform translation from the entity translation configuration, and tried to translate a webform field. Only ...
0
votes
0answers
19 views

Enable language selector for Paragraphs Library

I am using paragraphs on a multilingual Drupal 9 page. Everything is working fine, I can translate basic pages with paragraphs to get a multilingual node. I have now enabled the Paragraphs Library sub ...
1
vote
1answer
33 views

How do I programmatically translate a string?

I am working on one custom module to alter the fields labels of user login form for visitors. I created a module to alter the labels in the user login form. The French language is enabled on the setup....
1
vote
0answers
23 views

How to make the language of the subscriptions be the currently language in Simplenews

I'm implementing simplenews on a Drupal 8 Website, and I currently came across a problem with the anonymous user subscriptions to the newsletters. According to the documentation of simplenews, when ...
0
votes
0answers
29 views

Content translation not working on the front page

I have a translation problem on my site in drupal 9.1.3. I have a content type for my homepage that contains two fields: field_slides which is an EntiyReferenceRevisionFieldItemList to a Paragraphs ...
0
votes
0answers
19 views

Get node translation from JSON:API

I have over a dozen languages on my site and we use Json:Api since it's a decoupled drupal. Problem is that I can't figure out how to get the translated node values from the Json:Api response. The ...
1
vote
0answers
16 views

What can I use as a unique identifier between a node and its translation now that the “tnid” field is no longer available?

We are upgrading our site from D7 to D8 and a part of this includes sending data out to another resource, specifically, Nodes. When we send data to the 3rd party resource, it's expecting something ...
1
vote
1answer
80 views

what is the difference between Drupal.formatPlural() and Drupal.t()?

what is the difference between : Drupal.t(string, arguments, options ) and Drupal.formatPlural() Drupal.t() is used in the javascript part to translate the string and it can accept a set of arguments ...
0
votes
0answers
18 views

Language Hierarchy module bug or is it me?

Not sure if this is the right place to go with this question: However, before I file an issue with this, I'm wondering if it is something I'm missing or doing wrong. The problem. Given a language (...
1
vote
0answers
44 views

How to work with translations on a date?

I am trying to render a translated date coming from an API and I am wondering what's the best way to do it. The value coming from the API is formatted as "February 13, 2007" I would love to ...
0
votes
1answer
24 views

How to autoexpand everything on a view translation edit form?

To fully translate a view into one language I have to expand dozens of collapsed panels, most of them with only one or two subelements. I've reported it here. But is there a quick workaround, like a ...
0
votes
1answer
35 views

How to display the user's preferred language in a User profile page

In a Drupal 8/9 site, I can select the User's preferred language. In the "Manage form display" page (for user's fields), there are two rows which are about language: Language settings (...
-1
votes
1answer
39 views

How do I completely translate a page?

I want to develop a site in two languages. How do I completely translate a page? For example, the menu tab and other places cannot be translated. I just can translate using the Translate tab. In the ...
0
votes
0answers
21 views

How to get the URL component values in the Pager Link display when using Custom URL in Views?

I am trying to add a custom link in the Pager Section in a View that I am buidling in Drupal 8. The link should be dynamic and should be based on the current URL. Views allow you to add a static URL ...
1
vote
1answer
107 views

Translate dynamic variable that is an array in twig or using t()

How do I translate this in twig? I have this variable in twig that is an array: $array = [ ['number' => 7, 'name' => 'foo'], ['number' => 8, 'name' => 'bar'], ['number' => 10, '...
0
votes
0answers
21 views

How can programatically translate an non-English country name to English?

I have a webform hook that processes some conditionals depending on a country name dropdown on the webform. The conditionals need to compare to the English name because there are many various ...
1
vote
1answer
32 views

How do I change the original language of a product type?

On a multilingual site with commerce project I've created a product type while having one language selected as default but now I want to switch it to a different one. On /admin/commerce/config/product-...
2
votes
1answer
57 views

Should I use t() in hook_update_N() or admin UI in a custom module?

Background / motivation Many implementations of hook_update_N() and hook_install() in contrib and core modules in D7 and D8/D9 contain calls to the t() function. In general, I think it is considered a ...
1
vote
1answer
50 views

With Commerce Product taxonomy term view, is there a way to have page title set to the translated term title?

The only way to have the taxonomy term name in the title of a taxonomy term Commerce Products view page I've found so far is the example view in the estore theme (I still don't get how tid which ...
2
votes
2answers
107 views

Translate configuration values in custom webform handler

I created a Custom Webform Handler, which uses the email and name data from the form input to subscribe the user to a newsletter service through the vendors API. Ich created a configuration form with ...
0
votes
0answers
33 views

How translate Config Entity? [duplicate]

Hello everyone how are you? I created a ConfigEntity with some fields: Title (textfield) Body (CKEditor) After that I insert the first item: Title = "Hello World" Body = "This is a ...
1
vote
0answers
30 views

On the password_confirm widget, how do I change the text of “Password”? [duplicate]

By default, the password change form on the user account page looks like this: Current password Password Confirm password This is bad usability because it is not clear to users that "Password&...
1
vote
0answers
30 views

Need help to find right language detection configuration

We are developing a site with 10s of thousands of nodes and 12 interface and content languages. Having spent hours trying different configurations for language detection, I cannot find one that meets ...
0
votes
1answer
172 views

How to get taxonomy term reference fields value translated in twig

I have a taxonomy vocabulary with terms. In a content type, I have a referenced field with this taxonomy. I can get the taxonomy term in twig like this : {% for item in node.field_lorem %} {{ ...
0
votes
0answers
21 views

Two languages JS files

In my default/files/languages folder I have two JS files: es_BW4ZdvqK9tDPZ0JRAIb4Da2ATqVPvi01H1gYXugKgWo.js es_iXHy-aczd8O7uaoQze0vEQJL0ROMrskX7l3yWYGxC9r.js They are very similar, but one has some ...
0
votes
1answer
22 views

Alphabetically ordering vocabulary terms in a translated

I have 5 English-Italian terms in a views exposed filter: Academic | Accademico American Studies | Studi americani Medieval Studies | Studi medievali Music | Musica Reviews | Recensioni The English ...
0
votes
1answer
48 views

How do I make multilangual content synchronization between two sites?

I'm trying to figure out how to synchronize content between 2 sites. Before migration to D8 I was using views data export on site1, and feeds import on site2. My problem is, that in D8 I'm not able to ...
0
votes
1answer
16 views

How do I create a view with mixed languages, showing the node's original language by default?

I have a site with mixed languages, Spanish and English. Some content was originally created in English, then translated into Spanish. Other content was originally created in Spanish, then translated ...
0
votes
0answers
19 views

Adding translations for taxonomy term via REST API

Need to add taxonomy term with translation via REST API Steps to Reproduce Drupal install Enabled Language,Interface Translation,Content Translation,Configuration Translation modules Created Custom ...
0
votes
0answers
41 views

is-active class not applied to languageswitcher

Our site supports Arabic and English and so we use the language switcher. Currently, I have my language detector set to be based on the URL with the configuration set to path prefix. However, the is-...
1
vote
1answer
101 views

Pretty-printing JSON as preformatted text in translatable string passed as argument to method?

LENGTHY PREAMBLE: In a Service class, I'd like to display onscreen debug info for users with a specific permission. In my_custom_module.permissions.yml: 'view debug info': title: 'View debug info' ...
1
vote
1answer
46 views

How do I retrieve a plugin block field's translated value?

I created a module that installs a block with some fields when installed. I added a schema file, and altered the blockSubmit() function so that the translation is saved in the schema. Here is my ...
1
vote
1answer
144 views

Paragraph's fields value loaded in a custom controller are in the default language instead of the current language

I made a custom controller that load a paragraph field from a node and then render some part in a template. The paragraph field field_title and field_description are translatable. The translation ...
1
vote
0answers
181 views

How do I translate a programmatically-created custom block?

I am searching from long hours about this problem. I created a block programmatically, in my custom module, with hook_block_info(). I create its fields in hook_block_configure() and save values of ...
1
vote
0answers
10 views

How to add translation of terms to a search API index?

I have some media in the site default language, it is tagged by terms and the terms are translated. The media is not. How could I add the translated terms to the search index so it's possible to find ...
0
votes
1answer
16 views

Create language locales in D8

I am attempting to create/enable the UI to allow users to create translations in D8, and I need to create locales (e.g. en-us, en-gb, en-ca for English, es-mx, es-es for Spanish, etc). I've gone ...
1
vote
0answers
32 views

Different node parent menu for per language

My struggle with Drupal 8 continues as I moved onto i18n settings. I've enabled and configured content translation and now I'm facing issue of menu displaying untranslated pages. Popular suggestions ...
0
votes
1answer
23 views

How to sort translation under Translate tab?

I need to sort these translated language names alphabetically. I want to sort these irrespective of these languages weight and hierarchy. How can I do that?
2
votes
1answer
45 views

How do I change the current language in a Kernel test?

I'm writing a test for something that returns a Url from an entity. This should be language-aware, so the test needs to change the current language. I started off writing a Kernel test for this, ...
1
vote
1answer
24 views

How do I translate the weekday in a date?

I created a view from a JSON file; the dates in that file follow the 2020-07-28 20:00 format. I do a rewrite of the date to <span>{{ value_1|date("l d/m/Y") }}</span> and I get ...
0
votes
1answer
64 views

How to allow the translation of menu links provided by my_module.links.menu.yml

I have the Configuration Translation module installed in a multilingual site and I am able to translate any menu created with the UI.... This is fine!! I have a module which is creating some menus ...
0
votes
1answer
27 views

How to translate the author line “Submitted by … on …”

I've created a custom content type in Drupal 8.9.1. Each content post automatically renders the line Submitted by author_name on 08.07.2020 - 18:21 Even though my Drupal system language is set to ...

1
2 3 4 5
38