The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
6 views

I have a site that is translated in English and French - can't change “Home” link in menu

My entire Drupal 8 site has been translated except I can't find where to change the translation of the "Home" link. When the site is in French mode (with the /fr) all my menu items show the ...
0
votes
1answer
18 views

Custom e-mail translation in Drupal 8

I need to send some e-mails depending on some actions. These e-mails should be translated depending on the target user's preferred language. I've seen that the mail function has a language parameter, ...
0
votes
1answer
51 views

How do I create and apply a configuration schema for an existing custom module?

I have a custom module, already running for a longer while, but I did not take into account that the configuration would have to support translation. I have had no config/schema/module_name.schema.yml ...
0
votes
0answers
19 views

Language links are not working

I'm creating links for language in the main navigation menu. I have four languages configured in my site with content for each one. The default language is italian and whenever I save a new link for ...
0
votes
1answer
15 views

Entity without translation

I want to make entity in Drupal 8 called cash that store only numeric value (integer or float). I think, that entity not need translation. Is it possible for us to create custom entity without ...
1
vote
1answer
39 views

How can I get translated path aliases for a custom language switcher?

The Drupal 8 standard "Language switcher" dropdown does not give me what I need. What I need is to break everything apart into groups and subgroups, in a div, and have custom text for each Language, ...
0
votes
0answers
12 views

Entity Translate won't show translations on template overrides

I have set up entity translate and it lets me add the translations so they are stored in the DB. But when I click on the translated page, all I see is the orginal language which is English. So I these ...
1
vote
0answers
37 views

How to get rid of the “Ago” in a time format?

When translating to another language, a lot of things are in place, so much that most of translating goes with ease. However one thing seems very hard get done: getting rid of the "ago" in the format: ...
0
votes
0answers
20 views

How can I provide module translations? [duplicate]

in Drupal 8 we have added some elements and created some new modules. These elements and modules were labeled in english. As on the picture, red marked elements are still in english, the others are in ...
0
votes
2answers
47 views

How can I add paragraphs to a translated node?

I have a problem with the Paragraphs module and translation. I'm using Drupal 8.7.7 and Paragraphs 8.x-1.9. When I add a translation to a node with a paragraphs field (unlimited), I can only ...
1
vote
1answer
24 views

Translatable image field gets replaced when adding content

I have added an image field with Translatable Content enabled. My content type has enabled translations too. But when I add an image in the translation, the english contents field get replaced with ...
0
votes
0answers
10 views

Do not show content in view for specific field value and current site language

I have a multilingual D7 site. I have a fairly complex language hierarchy setup with 10 languages set up besides the default English. We are using the Language Hierarchy module so that we can specify ...
0
votes
0answers
8 views

Saving a translated node overwrites the last saved URL aliases [duplicate]

In Drupal 7 I updated the node in english then alias update in english version which is right I updated the same node this time in french then alias updated in french and also updated in english ...
2
votes
0answers
61 views

Webform module loosing language for referenced options

First I have content type "Quiz option" which is translatable. Then I have a view that returns Entity references of that type. For language option I selected "Content language of view row" and also ...
0
votes
0answers
12 views

Translation of labels

I added all the translation modules to my page. I can translate content with ease, however the labels won't tranlsate too. Ingredients (should be "Ingrediënten") 4 kopjes bloem 1 kop geroosterde ...
1
vote
1answer
23 views

How to render translated node body in two languages?

I use entity_translation to translate node body field, so in a fully loaded node object body is an array of 2 languages ('en' and 'ru'). For specific node type I would like to render body in both ...
0
votes
1answer
12 views

Translation server suggests translation with old date

in admin/config/regional/translate/settings page, i had Check for updates set to never and translation server to Drupal translation server and local files. i recently updated my site drupal version ...
0
votes
1answer
26 views

Output referenced entity in correct language

The following code outputs referenced entities in the original language they were created. {% for story in node.field_stories %} {{ story.entity.label }} {% endfor %} I want it to render in the ...
0
votes
1answer
68 views

Enable translation for theme settings

Theme settings are not translatable in core. Is there a way to make them translatable? I have some additional theme settings which needs to have different values per language. I'm trying to achieve ...
0
votes
2answers
72 views

wrong translation in admin/structure/views

I have a multi language site with Drupal 8.7.4 and default language is English. when i go to en/admin/structure/views i see list of views in English language. if i go to french interface via fr/admin/...
2
votes
0answers
20 views

How can I purge unused translatable strings from the translation interface?

During the development, the wording changed quite a lot. When I generate translation jobs with tmgmt module (or by any other means), all the old wordings are listed as well. Is it possible to have a ...
1
vote
3answers
116 views

Can I translate nodes and provide access to their translated content without the use of a site-wide language switcher?

Intended behaviour / question Writer creates /node/5001 Translator translates /node/5001 to french using all the niceties of the Content Translation backend system Visitor goes to /node/5001 and sees ...
0
votes
0answers
31 views

How to filter GraphQL query by content language?

I am coding Drupal 8/Angular app and Angular is fetching data from Drupal using GraphQL. Everything works fine except now I need to query nodes in a particular language. This is my query: { ...
0
votes
1answer
27 views

How to set “Language Selector dropdown” required in node form

I want to know How to set "Language Selector Drop-Down " required in node form? I tried to do this via hook_form_alter, but it seems $form['language'] is not created in this hook ! Is there any hook ...
0
votes
1answer
40 views

Node access doesn't consider translation

I'm trying to check user access to node via this code: $node = Node::load($node_id); User::load(\Drupal::currentUser()->id()); $node->access('view', $account) It seems it doesn't check ...
2
votes
1answer
41 views

How to get translated field_storage_config

I need to programmatically set the translated values for several fields on a node. For that I would like to set their values in the fields field_storage_config. Adapted from another question's answer (...
-2
votes
1answer
28 views

Getting translated version of Menu

I'm trying to get translated variant of Manu, but I can't make it work. This is code of what I'm trying to do, but this is for content node. $entitytype_manager = \Drupal::service('entity_type....
0
votes
1answer
20 views

Assign different taxonomy terms to translations of content

I've got some custom content translated with entity translation with custom taxonomy also translated. Actually taxonomy terms are correctly shown inside the content page. The problem is I need ...
0
votes
0answers
31 views

Get Translated Config

I've followed a few tutorials on how to set up a custom settings form and create translations. All this seems to work, but after adding a translation, I am unable to get the config settings for that ...
1
vote
0answers
45 views

PluralTranslatableMarkup does not return plural value [closed]

The code bellow should return plural. use Drupal\Core\StringTranslation\PluralTranslatableMarkup; $trans = new PluralTranslatableMarkup(12, 'singular', 'plural'); $output = '' . $trans; $output1 = $...
0
votes
0answers
18 views

Front page per language (paragraphs) [duplicate]

I have a multilingual site in Drupal 8 that needs to have a different node for front page on each language. The node alias is homepage and it needs to look clean. Ex. site.com/us/ site.com/ca-fr/ ...
0
votes
0answers
56 views

Custom LanguageNegotiator not working on interface translations

In a custom module I created a custom admin route /admin/config/mymodule/rebuild whose controller renders a node into a variable. The purpose of the module is to send the rendered content to an ...
0
votes
1answer
24 views

Unable to access translated node content

After performing a Drupal core update on my site today I've found that I can no longer access translated content. When I try to view or edit the translation, I only see the default language content. ...
2
votes
2answers
137 views

How can I have the language-specific 'enabled' Boolean of menu items being respected?

I'm trying to translate the 'enabled' field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file: function MYMODULE_entity_base_field_info_alter(&$fields, \Drupal\...
2
votes
1answer
34 views

Use hook to get the domain configuration from language

We have enabled English, Spanish, and French on our site. On Regional and language >> Languages detection we selected URL for Content language detection >> Detection Method. For Part of the URL that ...
0
votes
1answer
59 views

How to use t() function in controller?

I understand Drupal 8 ControllerBase implements StringTranslationTrait so we can use $this->t() in Controller class. But I found in Drupal 8 examples code, they setStringTranslation to use t() ...
0
votes
1answer
45 views

Not able to enable 'Configuration Translation' module gives error

I am trying to enable MULTILINGUAL -> Configuration Translation. It gives below error. Error: Call to a member function getPath() on null in Drupal\config_translation\ConfigNamesMapper->...
0
votes
0answers
20 views

Taxonomy terms not localized in view with enabled aggregation

On a view on content, I added a field "All taxonomy terms" (Display all taxonomy terms associated with a node from specified vocabularies) and enabled aggregation, see screenshot of view attached. ...
1
vote
0answers
9 views

Make interface strings configurable per language, identified by machine name

We are building a complex page layout where some labels should be not only translatable, but configurable per language, including English. The display logic is already custom code, so we are quite ...
0
votes
0answers
50 views

Exporting content translation to similar server

I have 2 instances of the same site built using Drupal. Both need to be translated, and most of the work of the translation has been done on site A and we need to take the translations from site A to ...
0
votes
0answers
32 views

Custom module translations without interface translation

I'm trying to figure out if I can provide translations to my custom module that are considered part of the "content translation" rather than the "interface translation." I have a form in my module ...
0
votes
0answers
6 views

Is Entity Translation module for Drupal 7 compatible with Internationalization and can they be used to translate menus?

I installed entity translation module for Drupal 7 and it works fine. However, I also want to translate menus and I found that Internationalization module can do that. The question is: are they ...
0
votes
0answers
14 views

D8 multi-language: How do I force the default path (/) for non-translated content after visiting translated content (/es/)?

I have a Drupal 8 site with two languages, English (default language) and Spanish. English (default) is at / and Spanish is at /es/ via the url detection rule and that rule is on top and the only ...
0
votes
0answers
30 views

Notice: Undefined property: stdClass::$domain in locale_language_url_rewrite_url()

I have a bilingual website set as two different subdomains (fr.domain.com and en.domain.com) and a custom module for content-aware language switcher link in the main menu (i.e. if I'm on fr.domain.com/...
1
vote
1answer
41 views

Running functional tests on a non-English site

When creating functional tests (extending BrowserTestBase) for a D8 site, how would I go about changing the default language of the site being temporarily created by BrowserTestBase? I'm trying to ...
0
votes
1answer
254 views

Generating URLs with fromUri and the language prefix, base vs internal

What is the recommended way to generate non-route URLs that include the language prefix? Context: In CiviCRM, an open source third-party project that integrates with Drupal, we have a function that ...
1
vote
0answers
29 views

EntityFieldQuery: Filter by field language

How would I use EntityFieldQuery->fieldCondition() or similar to filter by field language? E.g. give me all nodes where field_description has items in English, or in LANGUAGE_NONE? There is a $...
0
votes
0answers
33 views

Translate a taxonomy term in the exposed filter select options

I'm using Drupal 8 with Better Exposed Filters and for some reason the select options in the exposed filters (which are taxonomy terms) are refusing to appear translated, despite the fact that the ...
2
votes
0answers
286 views

How do I remove unwanted hreflang links from page

I have a content page in English with Japanese and Chinese translations. Even when I unpublished the translation nodes, the page source code will display the hreflang attributes to the unpublished ...
0
votes
0answers
30 views

Drupal 8 webform translated. Webform-block on page selected/listed not showing up (where is the manual)?

Drupal 8! Webform module! I have made a drupal webform and added it to my webpage with creating a block. The block is restricted to the page by url. Everything worked well with this method. With ...