Questions tagged [i18n-l10n]
Use it in questions about adapting software to different languages, regional differences, and requirements of a target market (locale).
1,907
questions
1
vote
1
answer
22
views
How to use non-english language in code
I'm italian and I've to develop a multilingual drupal site but english translations of strings (that should be added in code or templates) will be done in the future.
Is there a way to use in code a ...
4
votes
1
answer
372
views
Why would a multilingual site sometimes say "Save (this translation)" and other times say "Save (all translations)"?
We have a multilingual Drupal 8 site supporting 17 different languages and many more localized versions of those languages.
I have been noticing that sometimes when I am editing a node it says "Save (...
0
votes
0
answers
23
views
URL translations transposing between primary and secondary languages or just displaying wrong
We have a Drupal 8.7.10 site, multilingual (17 countries localized with 2 or more languages each).
In the example I am attaching, we have a "people" page where we are listing people for our company ...
2
votes
2
answers
343
views
How do you enable translation for a field which was defined by a contrib module?
I am trying to enable translation for a field which was defined by a different module.
The problem is this field does not list in the UI. When I checked the definition for this field in ...
0
votes
0
answers
55
views
Translate view (multilingual module)
I have create view where it get an image banner from custom post type.
Using multilingual module I could translate all nodes. except the view.
any way in how to achieve this?
I followed this answer ...
1
vote
1
answer
755
views
How to translate menu items with migrate?
I'm importing menu items from CSV using migrate, migrate_tools, migrate_plus and migrate_source_csv.
This is an example of how I'm doing it for the original language:
source:
plugin: csv
path: '...
1
vote
0
answers
512
views
Fallback to default language when node not translated to current language
I set up a multilingual blog site with Drupal 8 (in English and Japanese). What I want to do is create a blog in two languages. The default language is English. Mostly, the author will be translating ...
3
votes
1
answer
103
views
What is the purpose of Translation field in form display mode?
When editing the form display mode of a translatable content entity, there is a field called Translation in the UI. I thought this field would manage the weight/visibility of translation meta data ...
3
votes
2
answers
394
views
Custom content entity: can't hide translation details in edit form
I've created a multi-lingual custom content entity using Drupal Console. The basic stuff with editing/viewing works fine, also multi-lingual. But for some reason, I can't hide the "Translation" ...
1
vote
1
answer
377
views
I can't get the correct current language in node URLs
In D8, I have a website set up with 5 languages, using file path, like so:
website.com/en/link
website.com/en-us/link
website.com/fr-ca/link
etcetera.
I've made a view of blogs and resources. It ...
1
vote
0
answers
464
views
How to update a language's language code
I have a multilingual site with English as default language.
The language code for English is currently en but I want to convert it to en-US.
I thought about adding a new language with the correct ...
0
votes
1
answer
53
views
How to make Localization update believe that the translation of a local .po-file is not up to date?
I use a local development branch of a contributed project on several sites. The strings that need translation does not exist on https://localize.drupal.org/ (yet), so I cannot use it to translate the ...
2
votes
0
answers
73
views
Why path prefix is always leading to en instead of User's preferred language?
I am working a multi-lingual website which has 9 languages enabled. But the issue I am facing is irrespective of user's preferred language, site will be always prefixed with en. The required behaviour ...
1
vote
1
answer
323
views
Double values (products) in Commerce cart form
I use Drupal Commerce version 8.x-2.15. I have a multilingual Drupal site with multiple languages based on domain.
mystic.com -> EN language
mystic.eu -> NL language
etc
I added relationships:
(...
0
votes
1
answer
281
views
How can I translate the field group description?
I have created two field groups on the manage form display tab for a content type. I have added some description also.
On the interface translation, I can translate the field group labels but there I ...
1
vote
0
answers
30
views
Where can we translate Format settings label? [duplicate]
I am just wondering that where we can translate the Format setting labels which is configured in Manage display of content type. I checked in configuration translation, user interface translation but ...
0
votes
1
answer
69
views
MiniOrange SAML SSO Drupal Module – Multilanguage Support
This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one.
How do I configure Apache Server so that MiniOrange SAML SSO Drupal ...
0
votes
1
answer
37
views
Setting up multilingual nodes
I am trying to set up a D8 (8.7.9 to be precise) multilingual site and hitting some weird bug.
I have a node type basic page consisting of the title field and a body text field.
Initially I create ...
1
vote
0
answers
59
views
Do I have to start a multilingual site with a precise Language
I run Drupal 8.7.8 and tried to make it multilingual.
Is it important in which language you start?
I think I once stated with English and changed to German
I have some problems, because some text is ...
-1
votes
1
answer
28
views
Translating english node to spanish
How to create a Spanish version of node which is in English and that Spanish version of node should contain all fields from English content except one field. That one field should translate to Spanish ...
0
votes
1
answer
25
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
1
answer
333
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, ...
1
vote
1
answer
460
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
1
answer
21
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
1
answer
1k
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, ...
1
vote
0
answers
64
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: ...
1
vote
3
answers
2k
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
1
answer
107
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
0
answers
15
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 ...
2
votes
0
answers
153
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 ...
1
vote
1
answer
63
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
1
answer
24
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
1
answer
36
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 ...
2
votes
1
answer
643
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
2
answers
99
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
0
answers
30
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 ...
2
votes
3
answers
836
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
1
answer
687
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
1
answer
54
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
1
answer
181
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
1
answer
489
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
1
answer
41
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
1
answer
32
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 ...
1
vote
0
answers
85
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
1
answer
132
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.
...
3
votes
2
answers
1k
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
1
answer
396
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
1
answer
688
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() ...
1
vote
1
answer
760
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
0
answers
52
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. ...