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
0answers
3 views

Enabling field translation for content type causes node to not show value for that field

I am using Drupal version 7.80. I have a content type called "Public Resource" that has a bunch of fields. The content type has "Enabled, with field translation" for the ...
0
votes
0answers
25 views

How to display files by language

Is there a preeve of concept way to upload or display files translated in different languages. So for example if there is a site with German, English and Spanish. How to upload and display different ...
1
vote
2answers
46 views

Translate tab missing

I am working on my first multilingual Drupal 9 website, and I face a challenge. I can't seem to get my contact webform elements translated. I am using Webform Version: 6.0.2. I have enabled ...
0
votes
0answers
28 views

translatable content: how to set default original language

I've a D9 site, configured with two languages: Italian (default) and English. Some content types of the site are translable, the configuration under admin/config/regional/content-language for them is ...
0
votes
1answer
61 views

Programmatically add a translation with proper content moderation state

I am trying to add a node translation programmatically when a node is created (using hook_ENTITY_TYPE_insert). My code works fine except that the translation doesn't really have a content moderation ...
1
vote
1answer
44 views

How to allow user to manually change language when using “Browser” Detection as a detection option?

We have a site with multiple languages and have been using the Language Switch Dropdown menu to allow users to change languages on the site. But when we add "Browser | Language from the browser's ...
1
vote
1answer
38 views

How to print the paragraph field translation value in twig template

I am trying to access the nested paragraph field inside my twig template. {% for items in item['#paragraph'].get_aw_title_details%} {{ item.entity.field_award.value }} {% endfor %} When I am using ...
4
votes
0answers
33 views

What is the difference between Translation language, Translation source, and Original language?

Would anyone be able to explain to me what the difference is between "Original language", "Translation language", and "Translation source"? I think I have a pretty good ...
1
vote
1answer
27 views

Disable menu link for certain languages

I'm looking for a way to disable a single link in a menu for a certain language. From my understanding with similar issues, I'd like to activate translation for the menu link field Enabled since this ...
0
votes
0answers
27 views

New language defined and set to default, original language on config translation still remains English

I have installed languages and set one of them as default, but still numerous things, for example Translations for User account menu block (admin/structure/block/manage/bartik_account_menu/translate) ...
1
vote
1answer
19 views

Create link to node in specific language

So I need to create links to specific translations of a node but am having issues. This is my code: foreach($entities as $entity) { $urls[] = Url::fromRoute('entity.node.canonical', [ 'node' =&...
1
vote
1answer
52 views

Editing a node deletes body content reproducibly if Locale module enabled

I am experiencing a pretty serious problem leading to data-loss in D7. Editing any existing node leads to empty body content and newly created nodes have no body content whatsoever. Update: The error ...
2
votes
0answers
22 views

At creation time, why are shortcut titles translated, but menu link titles are not?

The idiom that the community points to for creating menu links usually looks like this (from \Drupal\Tests\language\Functional\LanguageSwitchingTest::testLanguageSessionSwitchLinks()): // Add a link ...
0
votes
0answers
29 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
19 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
32 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
15 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
45 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
22 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
52 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
14 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
30 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
37 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
29 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
30 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
24 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
21 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
97 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
45 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
53 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
40 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
22 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
198 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
22 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
33 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
59 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
72 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
169 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
31 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
310 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
25 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
51 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 ...
1
vote
1answer
109 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
2 3 4 5
38