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

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

0
votes
0answers
31 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
1answer
20 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
17 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
10 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
12 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
23 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
26 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
89 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
30 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
25 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
23 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/...
0
votes
1answer
15 views

Display node with mixed languages

My nodes, with entity translation enabled, need to be able to handle a node where the content of the node is displayed differently regarding the labels and menus. Let's say I am on a french page, ...
2
votes
2answers
55 views

Add Language Switcher on admin toolbar

What is the correct way for adding Language Switcher (Dropdown) or links on the admin toolbar menu from my custom module or from a contributed module?
2
votes
1answer
27 views

Interface translation conflict / same EN word, different translations

I've created a custom module, that uses templates with hard coded strings. I've created the .pot and .po files and included them my module's YML file. The Twig tempatles translate those strings using ...
0
votes
3answers
85 views

Language subdomains / dynamic config?

I am porting www.smartsheet.com, the German version is at de.smartsheet.com, the French is at fr.smartsheet.com and so forth. I could enter these domains in admin/config/regional/language/detection/...
0
votes
1answer
26 views

Show English when there is no translation

I have a website for a client, with more than 5 languages (bg, en, ru, ch, de, it ...). The client wants to add a news section but the news should be only in en or ch and if the user selects a ...
2
votes
1answer
29 views

Create translated node programmatically

I need to recreate the behavior drupal has when you create a translation but programmatically. Doing $node->addTranslation('de'); on a hook insert create an empty node but I need the field to be ...
-1
votes
0answers
31 views

array_search() expects parameter 2 to be array, null given in i18n_node_form_node_form_alter() (line 472

Warning: array_search() expects parameter 2 to be array, null given in i18n_node_form_node_form_alter() (line 472 of /home/xxxx/public_html/sites/all/modules/i18n/i18n_node/i18n_node.module). On line ...
0
votes
1answer
62 views

How to render a paragraph field in Twig in correct language?

I've got nodes with hero images. The hero images are a paragraph field with unlimited cardinality, each with an image and a translatable text. For design reasons I need to print the hero images in ...
0
votes
1answer
44 views

drush import export drupal configuration and translations

I downloaded the .po file for loading the Italian language and installed it on my local version of Drupal. Then, I launched the config:export command with drush and I committed the created ...
1
vote
1answer
32 views

Programatically set the language

I'm trying to automate the setup of Drupal multi-site installations as much as possible, we're using each multi-site for a separate country so would like the languages localised for each. Is there a ...
0
votes
1answer
32 views

how to optimize setting theme suggestion for different languages?

I've been trying to look for a way on how to optimize theme suggestions for different languages. The code below is a snippet of what I have been working on. One is for english and one is for Spanish. ...
0
votes
1answer
24 views

Export custom module strings for translation

I've developed some custom modules for a client and implemented the $this->t() method to enable translations on static strings, like table headers. Is there a way to export only the translatable ...
0
votes
1answer
30 views

Error in Italian localization for datepicker

Well, this is very funny :) I have a datepicker localized in Italian. It works correctly, except that, apparently, the abbreviation for Wednesday was translated as it were a personal pronoun, since ...
1
vote
1answer
27 views

Translation has duplicate admin content listings

When I add a language translate option to a piece of content for French. Drupal now adds a second listing of that piece of content in the content admin view. Is this the expected behavior? What if ...
3
votes
1answer
34 views

Only render translated nodes, prevent rendering of base language node

Having an entity reference, Drupal 8 automatically renders the base language of a referenced entity if it isn't translated yet. Is there a way to globally prevent that? So if there is ContentType1 ...
0
votes
1answer
26 views

Language switcher block hides for authenticated user

I have a language switcher added to my site. It works fine as long as I'm an unauthenticated user. Logging into site replaces it with: <span data-big-pipe-placeholder-id="callback=Drupal%5Cblock%...
0
votes
1answer
10 views

Order receipt e-mail language for guest checkout

Is there a way to have the order receipt e-mail be in the language of the site version that was used for placing the order? The order receipt e-mail that gets sent out (content of commerce-order-...
1
vote
0answers
24 views

Can multiple revisions of a node (entity) have different languages?

For example, we have a published English node, and a user creates a new draft and set the language (from the node form) to German and creates a new revision. This way the latest revision of the node ...
0
votes
1answer
51 views

Adding translation to a custom module

I cannot make the module translation strings to be considered, unistalling and installing the module again. Is the indicated .po relative path correct? in my module blockForm function i have : $...
-1
votes
1answer
27 views

Data in custom-blocks won't get saved

I created a custom block and pasted some HTML containing Hebrew text. The HTML was similar to this. <p><a href="/path">דוגמה</a></p> I saved the block. When I viewed the ...
0
votes
1answer
35 views

How to add a language dropdown switcher to top panel?

I try to create a multilingual (3 languages, incl. English) website, and I’d like to create a language dropdown switcher (ideally in the top panel/menu). I tried to accomplish this using Flags, and ...
0
votes
0answers
44 views

How to enable `trusted_hosts_patterns`? [duplicate]

I’ve registered a domain a webhosting service. Then I downloaded, extracted and FTP’ed Drupal 8.5.6 (current stable version from drupal.org). Successfully completed initial setup. (1) Then I checked /...
0
votes
0answers
14 views

Permissions for Flagging Translations as Outdated

I'm trying to figure out how to give a particular role permission to flag a translation as outdated but I'm having trouble figuring out what permission handles this. In the admin account I see this: ...
0
votes
1answer
43 views

Language Manager getCurrentLanguage returns default language instead

I am creating a multilingual D8 site, which 3 languages enabled. In trying to display the currently active language, the snippet $lang = \Drupal::languageManager()->getCurrentLanguage()->...
0
votes
0answers
29 views

Show empty field with custom text

I created a custom content type on D8 and have separated the fields into tabs using the Field Group module. Some fields are sometimes left blank and thus do not show up, but I still want them to ...
0
votes
1answer
44 views

How can I get translation for a field of custom date

I am using the paragraphs module. I have a field which contains a date and time e.g. for events, which is added by an author. For the output I use a paragraph-twig-file and I have this: <div class=...
0
votes
1answer
15 views

How to disable one specific translation page?

How can I disable only one page in English on a Drupal 7 site, without disabling the Danish page? I'm using Multilingual - Internationalization module.
1
vote
1answer
32 views

How do I pass the language through ajax request

I have an ajax function in the javascript file that calls for the data in a custom module. But the problem is it always get the data for the default language. In my case it is 'en'. How do I get the ...
0
votes
0answers
12 views

Problem trying to disabling field translation

I hope somebody already met the same problem and will be able to guide me. So here is my problem: I have a site with multiple content types. Some of these CT are using node translation, whereas other ...
2
votes
1answer
25 views

Language back-end/front-end separation [duplicate]

Is the following possible in Drupal 8? Front-end Content language set by URL (/en) Interface language set by URL (/en) Back-end Content language set by URL (/en) Interface language set by the ...
2
votes
1answer
103 views

Not all fields of node are present in content

I've set up a custom content on my multilang site type with several fields that are all configured to be translatable. But when I try to theme that node I only habe a subset of the field available, ...
2
votes
1answer
32 views

After module installation, updating translations still at 0%

I installed Drupal 8.5.6, in French. It seemed to work well, apart from no CSS working, but I corrected by unchecking CSS aggregation in the performance settings. I decided to install some modules, ...
1
vote
1answer
32 views

{{ language }} variable not available in block template

We are trying to generate a language dependent link in a custom block we created though the UI and placed it into a region. If I {{ dump(language) }} in page.html.twig, I've got it there. But not in ...
0
votes
0answers
23 views

Strings are shown twice in the translation page

Strings are duplicated in Drupal 8. Do you have any suggestion on how to remove a string?
0
votes
1answer
31 views

How to add currency field?

With respect to the question, can anyone suggest a remedy for the same. How can I create a field for currency(with selecting currency and text field to enter the amount) considering the fact that ...
0
votes
1answer
28 views

Multilingual Paragraphs fields are not present in node content

Following these Instructions I set up a paragraph field in custom node type. The field is called field_content_sections and it holds the paragraph elements. Next to it I created another field, the ...
0
votes
1answer
37 views

How do I translate hard coded words in twig file

Is there a way to translate hard coded words in twig when selecting a language from the language dropdown? I have used the |t ({{ myword|t }}) function but it doesn't seem to be work when selecting ...
0
votes
0answers
9 views

Language drop down shows the node id in the front page

This is only applicable for the front page. When I click the language drop down and select a language from the front page, the redirected url shows the node id. (/ja/node/187). It should only show the ...
0
votes
0answers
21 views

Set taxonomy term as translation of a term in a different language

I have two existing taxonomy terms, in different languages. How do I set term A to be the translation of term B?