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
1answer
58 views

What do the three checkboxes on the Interface translation import mean?

When importing a .po file at /admin/config/regional/translate/import What do these three options mean? Treat imported strings as custom translations Overwrite non-customized translations Overwrite ...
1
vote
1answer
87 views

How to add translation of all content?

I am adding Arabic translations to an English website. For every article node, I need to individually translate each node. Is there a way to add translations in one go? The customer will update the ...
1
vote
1answer
473 views

System emails translation

I wanted to translate emails sent to users after signing up using different language than English. I know there is a way to translate the system emails from the account settings translate tab, so I ...
0
votes
1answer
23 views

How to add View Translated Version button in Views?

My site is multilingual and I have a view page of content type. If node has translation then I want to add a button/link for viewing the translation. Example View Row 1 Title 1 Body 1 View in ...
3
votes
3answers
2k views

How to create translations programmatically?

I have a batch in which i'm importing nodes from REST webservices. My application has two languages, FR and EN (default is FR). So, I'm creating the node in FR, then, I loop through all other ...
-1
votes
2answers
15 views

how to apply language detection for the standard search page result?

I manage an intranet in french and dutch. I do not know how to apply language detection from the result page search/node. I mean I have a result page with both language references and I would like to ...
0
votes
1answer
406 views

Views pager labels not translated

I have a site (v8.4.2) with all core language modules enabled, 3 active languages, English is the default. The pager labels (e.g. "Last »") for my own Views are not translated although the string "...
3
votes
1answer
211 views

Remove translation from the title field

Is there a way to disable translations from Title field in each content type. In the /admin/config/regional/content-language, when I remove translations from Title fields it gives Fatal error: ...
1
vote
1answer
211 views

Getting translations programmatically from non-default language

Scenario: I have the original string: "Perro", which has its translations: EN => "Dog", FR => "Chien". Mission: In my custom module, I have the string "Chien" and I need to get its English translation,...
0
votes
1answer
29 views

How can i set different language for 2 different domain?

How can i set different language for 2 different domain? I have 2 different domain for single drupal installation www.example.en www.example.fr i want to display 2 different language based on the ...
0
votes
1answer
125 views

How do I fetch translated strings?

I have a progressively decoupled Reactjs application running on top of Drupal. Its a multilingual application. I need to fetch the translated strings from the Drupal itself and handle the ...
0
votes
1answer
1k views

EntityQuery condition on translation status

Im currently using Drupal::entityQuery() to build a list of node. I need to be able to query only contentEntities that have a specific translation not published. I struggle because I don't know how ...
1
vote
2answers
363 views

Unable to save content language configuration

My Drupal 8 website is multilingual and has many entity type bundles for nodes, taxonomy terms, paragraphs, media et cetera. This leads to a content language settings form (admin/config/regional/...
-1
votes
2answers
88 views

Language switch with query parameters using hook_language_switch_links_alter

I used hook_language_switch_links_alter for preserving the query parameters while languge swiching. function custom_job_search_query_language_switch_links_alter(&$links, $type, $path) { $params =...
0
votes
2answers
200 views

Show available languages in content-view

in older-drupal-versions when content was translated to different languages, it was possible to indicate in which other languages that content is available and in which not. Let's say I have en, de ...
0
votes
1answer
25 views

When you have multilingual content not in the Original language

Bilingual content is fine, but what do you do in Drupal 8 when you have content only in a secondary language. I've got a site in English & Japanese, with pages mostly in English (Original language)...
0
votes
1answer
55 views

What's the best way to put in a link to a translated node in a D8 template? [closed]

There just has to be a better way to insert a link to an alternative translation than this: function THEME_preprocess_node(&$variables) { $node = &$variables['node']; // Current ...
1
vote
1answer
453 views

Routing for controller with multilingual enabled

On my Drupal 8 multilingual project, I have made a custom controller which create a basic page, but I can't figure out which parameter I must use in the routing. Is this _locale? This is the ...
0
votes
1answer
89 views

How to detect entity translation without using path prefix or domain?

We have a situation where we want to have Content Translation enabled. It is our understanding that this is using Entity Translation(from D7) that is now in D8 core. This also means that there will be ...
0
votes
1answer
46 views

Problem changing language - Redirection to installation

By browsing my website in Drupal, I can browse perfectly through all the sections. The website has 3 languages. For Spanish, I can navigate well. For English, I can navigate well But any page I try ...
0
votes
1answer
99 views

How to translate a header in drupal 7

I have a drupal 7 site I inherited to manage. There is a view I can edit at /newsletters#overlay=admin/structure/views/view/newsletters/edit and it has a section titled "header" that I can't figure ...
0
votes
1answer
23 views

PO files inside contrib modules

Situation is that inside contrib modules folder I found out that each module has /translations and inside a .po file which is not cool when it comes to modules update. I want to take out these ...
1
vote
1answer
102 views

Drupal 8 allow only listed languages

Is there a way on Drupal 8 to remove "Not specified" and "Not applicable" languages from list and to display only listed Languages?
2
votes
1answer
3k views

Use the trans tag in Twig without escaping HTML

I would like to use variables containing HTML inside a trans tag in my Twig template. (The variables contain the start and the end of a link which appears at different positions in the sentence for ...
2
votes
1answer
691 views

How do I get a field label in different languages?

In a module (not a template), I need the label of a specific field in multiple languages. $entity->getFieldDefinition('myField')->label() gives me the label in current/active language (let's ...
2
votes
1answer
22 views

I want to uninstall l10n_client which may be duplicated

I use composer. The L10n_client module could not be updated or occasionally not found. I feel that the names of L10n_client or l10n_client_ui are different. It is a similar atmosphere as below. https:/...
0
votes
1answer
211 views

t() and {% trans %} show no effect although rest of site is translated

I'm a bit hesitant to ask this, but I have a drupal 8 site with 2 languages enabled - English as default and German. I have URL prefixes 'en' and 'de' to detect the chosen language. When setting ...
-1
votes
1answer
37 views

What are all the steps to have a user-selectable second language in Drupal 8?

I want to add a second language to my site. What all do I have to do to enable a language and make it selectable by the user? Also, how can I keep from having all of the content show up twice-- once ...
-1
votes
1answer
91 views

Restructure Language Prefix example.com/ca-fr [closed]

I created new Language method in Drupal 8, I need url example: example.com/en-fr, The first part of URL is a country code and the second is a language code. Language switcher should give possibility ...
2
votes
1answer
2k views

How to get language prefix in Drupal 8 [duplicate]

I am building internal in my custom module that I am porting to Drupal 8: https://www.drupal.org/project/taxonomy_facets I need to get a current language prefix so I can prepend it to the link. I ...
0
votes
1answer
229 views

Translation for webform error message

I using drupal 7 for my website. I created one feedback form using webform and Internationalization for both English and Japan version. It works fine, but the error message for Feedback is required....
0
votes
1answer
183 views

Change language name based on the domain i'm on

I'm looking for a solution which can alter/change a language name based on the domain I'm on. Here I can configure one name, which is used everywhere, but can't be configured for each domain: /admin/...
0
votes
1answer
24 views

Translate node with node fields

I'm using the Node Field module. When I translate a node its respective node fields are not copied to the translation, forcing me to recreate them by hand. Is there a workaround to this?
0
votes
1answer
20 views

D7: Empty image upload field when adding a translation

By default when you add a translation your fields get pre-filled with the content of the original language. Is there a way to stop this behaviour for specific fields, in this case an image field. Both ...
0
votes
0answers
166 views

Views field product link does not link to correct language

It seems that, no matter how the view is configured, the product link field always links to the default language even if user is viewing the page in a different language. However, the product title ...
1
vote
0answers
210 views

get field list translation

I have a list field on Profile entity for civilities. I want to get the value of this field in a specific value whatever is the current one. Since the Profile isn't translatable I can't get a way to ...
3
votes
3answers
2k views

Multilingual site, always use language path prefix (no bare URLs)

I have a Drupal 8 site with two languages, Japanese (default language) and English. By default, the default language pages are available at both / and /ja. For example, /about and /ja/about both go ...
0
votes
2answers
329 views

Can't save any changes on the Content Language & Translation page

I'm using Drupal 8 and when I go to /admin/config/regional/content-language and try to turn on "Custom menu link", it doesn't save, and it just reloads unchecked. I saw here that you need to check ...
0
votes
0answers
300 views

Translatable paths with parameters in routing.yml

Given the following routing.yml: my_module.my_route: path: 'some-path-in-english/{slug}' defaults: _controller: '\Drupal\my_module\Controller\MyController::__invoke' requirements:...
0
votes
2answers
552 views

How to create a list of untranslated content in views?

I want to create a list of all nodes that has not been translated into a specific language - how do I do that? I'm using Drupal 8.
1
vote
1answer
35 views

How can I switch language links to master links on a translated page?

On my website currently only one content type gets translated and is therefore available in multiple languages. On this content type/page all the links (logo, menu, footer, etc.) refer to their ...
1
vote
1answer
513 views

How to determine if a translatable field has translation enabled?

How can I figure out if a translation for a translatable field has been enabled? I don't mean if a field is translatable in general. e.g.: $entity_type = $entity->getEntityTypeId(); $bundle = $...
0
votes
1answer
23 views

Problem with i18n_string + features + sites with different default language

(I will talk about i18nviews in this question, but I think the problem applies equally to other cases of i18n_string) Background With regular Drupal t(), Drupal will always assume that the original ...
0
votes
1answer
78 views

Language fallback for unpublished translation

on our Drupal 7, we have pages in 6 different languages. We'd like to remove the translation for some nodes. I thought that users would be automatically redirected to the default (English) language ...
0
votes
1answer
2k views

How to load translated entity values in Twig for SEO purpose?

How can I get access for the english values of my entity in the french version of my twig template. This is for a tracking task. Let say I want to print the node title en english on the french ...
1
vote
1answer
90 views

How can I clone all field values when creating a node translation (entity_translation) programmatically?

I use entity_translation and have an en node currently without translations. Assume it has fields field_foo and field_bar so currently they are: $node->field_foo['en'][0]['value'] = 'foo'; $node-&...
1
vote
1answer
818 views

How to hide not translated menu items

I have a multilanguage site. Now i'm running in the issue that some pages don't have translations. So i would like to hide that from the navigation. I already tried to manipulate it with that hook: ...
0
votes
2answers
1k views

How to use the same URL alias for all translations of a node?

I want to use the same URL alias for all nodes regardless of language. On my site, the primary language is English. Translation is enabled for nodes of type basic page. At /admin/config/regional/...
0
votes
1answer
109 views

How to exclude Admin Toolbar from being Translated in Drupal 8?

I have enabled 3 languages, but I always want to show Admin toolbar (menu) in English, I don't want that to be translated, how can I do that ? If I want to see front end content in Arabic then I don't ...
0
votes
1answer
340 views

Why does deleting a translation on my custom entity delete the entire record?

I have defined a custom content entity. (You may find the details below.) If I create an entry in the table and a translation for the entry and then delete the translation it removes the entire entry. ...