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
1answer
43 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 "...
0
votes
0answers
15 views

How to get language prefix in URL for terms without translation?

I have a multilingual website with taxonomy vocabulary, which terms are not translatable (company names). But each term has translated meta tags and paths, depending on the selected site language. For ...
0
votes
1answer
27 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
1answer
34 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 ...
1
vote
0answers
25 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. ...
1
vote
1answer
39 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() ->...
1
vote
1answer
16 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: ...
1
vote
1answer
13 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 ...
0
votes
1answer
20 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 ...
0
votes
0answers
21 views

Setting a domain on URL language detection configuration creates an error

admin/config/regional/language/detection/url I selected the "domain" option, and set my english to example.com and my french to french-example.com. When I saved the page, I got the error, &...
0
votes
1answer
29 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 ...
0
votes
0answers
10 views

View with translation not working as expected

I have a view that filters content (films) by category and it works as expected. I've added a new language to the site and some categories are not applied in both languages to the same content, but ...
2
votes
2answers
58 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 ...
2
votes
1answer
118 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 ...
1
vote
0answers
17 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
0answers
45 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
1answer
19 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.
2
votes
0answers
53 views

In the context of a multilingual site, what is considered "interface text" and what is "content"?

On the Language Selection and Detection configuration page (in the toolbar, Manage > Configuration > Regional and language > Languages > Selection and Detection), I see that I can detect ...
0
votes
1answer
36 views

How to translate content but not backend interface?

I'm trying to set up an English administrator back-end and a URL based front-end (anonymous user content) translation. I follow a guide on the subject, but I haven't been able to achieve what I wanted....
0
votes
0answers
28 views

get translation programmatically of field value in specific language

I have created a content type (pdf_form) to which I added a field_gender_languagetest with two options, male and female. I translated both the options in German using the translation tab. Now I am ...
-1
votes
1answer
38 views

Custom translation function

I need own translation function in my custom module where i have defined language codes ('en','ja','de'....etc) Now i just wanted to pass word and language code as a parameter and it returns ...
1
vote
4answers
605 views

Error when updating translated content

I have fought for some time with the error below: Non-translatable field elements can only be changed when updating the original language. I have "inherited" a site a few years ago and ...
0
votes
0answers
34 views

How to export view's translation?

I used view translate(/admin/structure/views/view/my_view/translate) to translate a filter's label and saved. When I refreshed the view, it worked. Then I went to /admin/config/regional/translate/...
0
votes
0answers
27 views

How do I install Drupal with multiple custom languages using drush?

I know I can install a new Drupal web site with single custom language using: $ drush si standard \ --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]' \ --account-name=admin --account-...
0
votes
0answers
24 views

Content Translation installation breaks the website (statistics module error + aliases not taken into account)

First, I would like to say I am a total noob in Drupal and PHP but possess some knowledge on other web frameworks/languages). Here is my path to the errors: I used the UI to install Content ...
0
votes
0answers
38 views

Translating Menu Item Programmatically?

I have been trying to translate menu items programmatically but upon saving it just adds the english field value to all my translations. Below is the code I am trying to execute: if ($entity->...
0
votes
2answers
52 views

Language switcher block is different on remote site

I'm working on a multilingual site and on my local version of the site I added the default language switcher. It show like this: <div class="language-switcher-language-url block block-language ...
1
vote
0answers
82 views

How translate custom email programmatically?

I'm on a D9 Site. I've created a module, where I define a hook_mail, a hook_theme and a preprocess for swiftmailer twig: function my_project_breakout_rooms_theme() { return [ '...
0
votes
0answers
8 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
30 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
129 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
31 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
114 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
56 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
115 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
41 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
31 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
48 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
54 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
26 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
46 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
24 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 ...
2
votes
0answers
90 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
16 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
59 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
24 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
2answers
350 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
20 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 ...
1
vote
0answers
116 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
2 3 4 5
38