Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [i18n-l10n]

Use it in questions about adapting software to different languages, regional differences, and requirements of a target market (locale).

0
votes
0answers
8 views

How to translate vocabulary name?

Drupal 8 installation in English, German lang was added and set as default, vocabularies are set to English (no result even they are in German too), terms are set to German by default, Content ...
1
vote
1answer
12 views

How to use language-specific menu items in URL aliases

I'm working on a site with internationalization from the source language, English, into a few other languages. Translating the pages has worked out fine; however, I'm running into trouble with URL ...
0
votes
1answer
13 views

How to get language code of a field in a node

I have a requirement where in hook_node_insert I need to get the language code of a field What I have tried is $langcode = $node->{$field_name}->langcode But this returns null. Any ...
3
votes
1answer
43 views

robots.txt vs language path prefix

The default robots.txt shipped with Drupal contains rules such as this: Disallow: /user/register/ If I understand correctly, the leading slash means this really has to match the beginning of the ...
-3
votes
0answers
40 views

How to fill hreflang in metatags?

I have a Drupal 8 site with the "Metatags" module installed. I want to create a site with multiple languages. Here is the path in French for a node: https://www.domaine.com/fr/node-title Here is ...
-3
votes
1answer
29 views

Language switcher doesn't work

I have a fresh D8.64+Bootstrap 3 installation, after enable multilingual modules, add languages and config language dection and content/menu translation, I placed the defualt language switcher to the ...
2
votes
1answer
65 views

Language switcher links are hidden for anonymous users

I'm trying to add a language switcher to a Drupal 8 site menu (it's switching between English and Spanish). I have the links working when logged in as admin but they're not shown for anonymous users, ...
0
votes
1answer
17 views

InvalidArgumentException: Invalid translation language (fr) specified

I'm currently trying to translate my twig template to the current language and at this moment I'm getting the following error InvalidArgumentException: Invalid translation language (fr) specified. ...
1
vote
1answer
20 views

Error: Call to undefined function locale_translation_use_remote_source() in install_import_translations()

After I added a language, and set as default language, I get this error. Error: Call to undefined function locale_translation_use_remote_source() in install_import_translations() I didn't enable ...
1
vote
0answers
26 views

entityQuery where a translation with a different value returns incorrect nodes

The title seems a bit odd, I know, but I couldn't find any issues similar to this and that's the best I could come up with. We are running into an odd instance of entityQuery returning nodes that ...
1
vote
3answers
68 views

How to get the language code when a language name is given?

We are creating nodes programmatically on submitting a form. The language of a node is an input value in the form. How can I get the langcode, when I have the Language name? For example, user may ...
0
votes
1answer
41 views

main menu link as language switcher

I have 2 language and these situation: main menu -> lang1 -> link to www.foo.com/ main menu -> lang2 -> link to www.foo.com/en All sites when switch manually on browser the language, But my main ...
0
votes
0answers
62 views

View display plugin “entity reference” not using translation

For some of my entity reference fields I'm using "Views: Filter by an entity reference views" as reference method. I've configured those views to use the current interface language for rendering (with ...
0
votes
0answers
37 views

Remove string from [node:url] and node alias

Background We have enabled content translation where we detect based on the content language. This allows us to translate properly as needed, but it has a bad side effect. It will not only add ?...
-1
votes
0answers
32 views

Paragraph translation

I have a Drupal 8.6.3 site that is using translations. English and Arabic are the only two languages as of now. I'm having a problem with paragraphs not translating between the original, English ...
-1
votes
0answers
10 views

how to do webform translations? Or how to apply webform localization to a page?

recently I tried Webform localization using string translations, but i could't see translations on page the form was as it been. So the question is how could i apply my translations and see changes? ...
0
votes
1answer
28 views

Translation of label in yml configuration file

After having read https://www.drupal.org/docs/8/api/translation-api/overview and in particular Translation for shipped configuration and configuration schemas I tried to use this ability to have ...
1
vote
1answer
41 views

Automatically importing module-provided translations during installation

I have a custom module whose interface strings have all been written in English. This module is not (and will not be) hosted on drupal.org, so I'd like to pack the translations for those texts ...
0
votes
2answers
43 views

How can I allow HTML links in translated strings?

I created a custom D8 module with all text strings declared in English, either via this->t(), t() or in various configuration (YML) files. I am now in the process of translating those strings in ...
1
vote
1answer
17 views

Show content that is tagged to both current node and translation source

I'm using Drupal 7, i18n, Views3, translated_entityreference, and Entity Translation. http://lingtransoft.info/apps/paratext I have a content type: Training Resource, and each Training Resource is ...
4
votes
3answers
81 views

How to clone a node without translations

I have a site with multiple language. Assume I have a node (nid = 1) with origin languages is en and translate to es. And I clone this node with code: $node = Node::load(1); $nodeDuplicate = $node-&...
0
votes
0answers
39 views

View results to show results in language of current page, but if no translation available show original language?

I need a view to display results based on the following: if the content has a translation available in the language of the current page, show that one if the content DOES NOT have a translation ...
1
vote
1answer
38 views

How to get term ID from translated term name?

I have a custom argument validator for Views, which expects a term name input and outputs the tid for the query. This works great in English, but I'm not sure what to do for translations. Is there any ...
2
votes
1answer
21 views

Multilingual REST export

I have Drupal 8 site which interacts with a React component. I want to expose one of my content type's content using REST export in views. How do I set views path to create REST export for ...
2
votes
1answer
22 views

Display block content in current language

I have multilingual Drupal 8 site. I want to display views block in home page. It should display block contents in current site language. Example: I have content type called "Book". Which has ...
-1
votes
0answers
17 views

Fieldset title with no <a> tag when internationalization installed

Working on a multilanguage Drupal 7 site. When forms are rendered in an alternative language, the fieldset titles loose the <a> tags hence collapse functionality vanishes. Form API element ...
-1
votes
0answers
18 views

Translate programmatically a menu lable

Translate programmatically a menu label I m using hook menu to get menu item programmatically. need to load menu item label based on the language code like how we used do with taxonomy term $...
1
vote
0answers
38 views

How can I build a blog in a single language that isn't English?

I am developing my new blog based on Drupal 8 and I want only Greek version of the blog (don't want content translation). I added Greek language as default and if there is also English then there is a ...
1
vote
2answers
75 views

How to sort language select list on current language context

I have a form with a language field with the language select list widget. The options of this field contains an array with a pattern like ['langcode' => t('language')] Now I want to sort these ...
0
votes
0answers
16 views

How do I enable translation tab for unpublished contents for users except administrators

In the node edit form the translation tab is hidden in unpublished contents for users except administrators and the author of the node? How do I give permission to translate those nodes for other ...
2
votes
0answers
22 views

Can global user interface translations be used for views translatable strings?

In Drupal 8, views translatable strings are translatable in the views translate pages, aka. admin/structure/views/view/%view%/translate/%lang%/edit In these pages by default the English string is ...
0
votes
0answers
40 views

How can I translate the “Published” checkbox?

On the node edit form, I would like to translate the Published checkbox in Foo only for a certain content type. Therefore, I implemented hook_form_alter(). I cannot find the label string in any ...
2
votes
1answer
44 views

String passed to the T function in inline_template not accessible for translation

For a custom field I have a formatter: public function viewElements(FieldItemListInterface $items, $langcode) { $elements = []; foreach ($items as $delta => $item) { $value = ...
0
votes
1answer
18 views

Unable to override default translation publishing status using entity_translation module

We are using the entity_translation module in a large site, and we have 57 defined languages. We have some custom date fields in each locale, and we are using some custom code to only publish the ...
0
votes
1answer
28 views

Custom entity translation interface

I created a new custom entity using drupal console, I enabled translation and all looks ok in code. The problem is that I don't know how to translate an entity from the admin interface, I don't see ...
0
votes
2answers
89 views

Multiple Relations and Contextual Filters in a Translated View

I have a View designed to filter down translated content (of type "Asks, Actions, and Updates") using three arguments: 1) country 2) year 3) month. I have translated the content type and content, all ...
-1
votes
1answer
16 views

User should not be allowed to edit language

I have a question regarding this. I have a Multilingual site in drupal 8 and i want to disable the edit language for user, so they can´t change the language, if they have chosen one or redirect them, ...
1
vote
1answer
103 views

How to override canonical URL?

Following the Translating content documentation we have setup our site to have Spanish, English, and Japanese. When we are adding, editing, deleting, and publishing pages in different languages we ...
0
votes
1answer
32 views

Translatable strings not appearing in the translation interface [duplicate]

I've recently started working on a custom D8 module. I've used $this->t() (or t()) wherever I had to output a text so that this text would then be translatable. My module works correctly, but when ...
0
votes
0answers
46 views

Editing Drupal translations, but wish to keep English interface text while doing so [duplicate]

I have a Drupal 8 site configured with 3 language in addition to the default English. I can add translations in all 3 languages from the Translate tab on the node edit form. Editing the translations, ...
0
votes
2answers
34 views

Translations string email not work

in D8 (multilanguage site, with two languages) i wanna send email for registration, etc by user preference of language of user (People -> Edit people -> Language Settings) I've enabled all modules ...
0
votes
0answers
23 views

How to disable Internationalization for some pages?

I wonder if it's possible to have news and other sites, which is shown on my frontpage translated only to Danish or English. I'm using Internationalization module. But if I am making an article in ...
0
votes
1answer
28 views

Deleting translate interface strings programmatically or using drush

I need to delete some translated strings added using t() function, I've about 17000 string to delete is there a way to delete it using a SQL query or drush command? in which table those strings are ...
0
votes
1answer
14 views

Attempt URL alias for spanish version of page - “The path */* is either invalid or you do not have access to it.”

Drupal 7.59. We have the page whatever.tld/thanks and whatever.tld/es/thanks. I'm trying to setup whatver.tlp/gracias as a URL alias for es/thanks and it says "The path 'es/thanks' is either invalid ...
1
vote
2answers
27 views

Managing custom theme translations file

How to add a translation file to a custom theme? I did my_theme.info.yml 'interface translation project': my_theme 'interface translation server pattern': themes/my_theme/translations/my_theme-%...
0
votes
2answers
29 views

Available node language only English

I have a custom content type with "Set custom language as default for new content" and "Require language". Custom default language is Current language. Entity translation is defined with "Current ...
2
votes
2answers
94 views

Convert pot file to array

So, what I need to do is to convert the contents of a .pot file to a PHP array. I know there is _locale_import_read_po(), but when I tried using it with the following code, I got an error. $...
0
votes
0answers
37 views

strange 'leftover' URLs in pages header

I tried to find answers to my question, but I couldn't - it's perhaps kind of hard to describe - no specific keyword that I could find.. Anyway, I will describe what the problem is. I have created ...
1
vote
1answer
61 views

EntityQuery not returning content based on language

I'm trying to get a list of all of a specific content type, but my entityQuery is only returning the original language of the site (English). Here's my code: public function ...
0
votes
1answer
31 views

What message is throwing InvalidArgumentException(s) in my contact forms?

When submitting a contact form it redirects to a WSOD and this is logged: Uncaught PHP Exception InvalidArgumentException: "$string ("Message") must be a string." at /Applications/MAMP/htdocs/onb/...