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
0answers
15 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
83 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
1answer
406 views

Is there a function to get the system path for the current language?

If I'm using multiple languages on the site with path prefixing, is there a quick way to get a system path for the current language? For example, if the current language is English, and I'm ...
0
votes
2answers
411 views

Multiple domains with a language each

We've setup that english language points to an english domain, and for spanish we have a language. The spanish one is simply a symlink to the english code base. When translating nodes, I am being ...
27
votes
5answers
40k views

How do I translate strings in Twig templates?

I am working on a (my first) Drupal 8 project witch is a multilingual site. Drupal 8 really delivers in terms of native support for content translation. However, I have a few strings set directly in ...
15
votes
4answers
13k views

Import po-files using Drush

I have about 20 sites that have a common translation. I don't want to go into admin of each site each time the po-file is updated. Is it possible to import a po-file using Drush?
0
votes
0answers
10 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
112 views

multilanguage site

I have a multi language drupal site. It's in English, German and Japanese. When using a translation, the sites name is still displayed in English. How do I make the site change the site name to the ...
3
votes
0answers
120 views

Error in translating apostrophe in module Path metatags

In module Path metatags if I set a text for all languages, a text with an apostrophe, all is fine. But when I translate that text to other language of the web, the apostrophe is shown as &#039 in ...
2
votes
1answer
50 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 ...
3
votes
0answers
310 views

Front page without language prefix

I have a multilingual site on Drupal 8 migrated from Drupal 7. It has URL language detection method. Default language is English, it has path prefix /en. With this configuration front page is ...
-2
votes
0answers
11 views

Translate “All” for isotope filter [on hold]

Am translating a Drupal 7 website to Japanese. I was able to translate all sections but am failing to translate the "All" filter of the Isotope filter. Please help.
0
votes
1answer
18 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 ...
1
vote
1answer
397 views

Redirect user to language other than default

So... i have set a drupal website with 2 languages, english (default) and portuguese. At some point during development the client asked me to change the default language to portuguese but as i've read ...
3
votes
3answers
2k views

Multiple language node import with Feeds

I am using Feeds to import a very huge CSV file with products to my Drupal Commerce site. My site must be in two languages and it appears that Feeds hasn't support for this. How can I import nodes in ...
-1
votes
1answer
89 views

Translate custom content type data?

I have a custom menu name "publications" after edit, I select the multilingual option to "Translate and Localize. Menu items with language will allow translations. Menu items without language will ...
1
vote
1answer
28 views

Convert imported strings into array

I have imported a .pot file using the _locale_import_read_po function, like this: $po_files = file_scan_directory('/', '/.*\.pot$/'); if (count($po_files)) { require_once DRUPAL_ROOT . '/includes/...
0
votes
1answer
46 views

User automatically redirected to main language page

In my website I have the users automatically redirected to the main language page. If for example: node/2 is the translation of node/1 when I type: www.mywebsite.com/node/2 I'm immediately redirected ...
1
vote
3answers
418 views

A node reference is empty, although the multilingual support is enabled, and the node is translated

I just created a multilingual site (English-French) using Drupal 7 with the module Internationalization 7.x-1.4. Everything is working fine except with the module References 7.x-2.0. For instance, I ...
0
votes
1answer
457 views

View that link to content in other languages

I have a multilingual site where some content types are translated, and others will remain English only. I'd like to have lists of English content on other language sites. I've created a view that ...
0
votes
1answer
392 views

Views pager labels translation per context

Now that I finally have managed to have Views pagers appear, I'm wondering how I could change the strings collection (prev, next, first, last...) per View. That's because in a View that displays items ...
1
vote
3answers
60 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
1answer
22 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 ...
0
votes
1answer
550 views

How can I translate the checkout system?

I have been translating my Commerce Kickstart site with no ease although with success until now. Have translated content, taxonomy, product fields etc, following some tutorials and Drupal own ...
1
vote
1answer
406 views

URL aliases and Entity Translation (menu name replacement pattern)

I am using entity translation (Field translation) for my nodes, and set the menu name on each 'page'. The menu itself is arrange to basically have a duplicate tree in the same menu each with a ...
2
votes
1answer
36 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 (...
3
votes
1answer
435 views

Adding translation files to install profile?

I am building a Drupal installation profile to make deployment of my site easier, ideally I would like to include the translation files to the install profile as well. But apart from adding the core ...
0
votes
2answers
425 views

Switch site language after IP to locale redirect

I have a Multilingual Drupal 7 website. using i18. I redirect my visitors based on IP address with IP to locale module. Now e.g. visitors from Holland (Dutch IP) are redirected to http://landberg.at/...
0
votes
1answer
427 views

showing translation of the related node in view

I have a node type called Match. Each match have two entity reference fields that points to two nodes that has the type of Team. I built a view and use the relationship to show the matches and the ...
4
votes
1answer
407 views

“Page not found” on translated page

I’m setting up a dual language site (English default / Chinese, Simplified) where Taxonomy translation mode is “Localize”. I modified the Taxonomy term in Views. I get results with preview in both ...
0
votes
2answers
988 views

problem with $conf['i18n_variables']

i have installed i18n module and added this lines to setting.php and empty cache to translate slogan and contact form information and ... but it doesnt affect site and values dont add to ...
0
votes
1answer
458 views

List field: translated values are not translated

In my Drupal 8 project I have some list fields. For example maybe a field "project type" with the following key|values, coming from the original language German: 1 -> öffentliches Projekt 2 -> ...
1
vote
0answers
44 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 ...
2
votes
1answer
434 views

entity_metadata_wrapper langcode always prints default language

I'm using entity_metadata_wrapper with entity translation to print fields in a template, but it always prints the default language when using a langcode in the options. $wrap = ...
11
votes
1answer
3k views

What is the difference between {{ |t}} and {% trans %}?

I notice that Drupal 8 support {% trans %} which, according to the Symfony documentation (The i18n Extension), adds gettext support to Twig. {{ |t }}, as far as I know, is the legacy way to add ...
0
votes
1answer
434 views

Translate “Link text” in View

I have the following text/token in one of my field's "Link text" field. "Download [file:name]" How do I translate "Download" Here is a screenshot: https://www.dropbox.com/s/lwquchykaymh20j/...
-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
502 views

Language variable doesn't work in Twig?

I have to put a several languages in a site. But I just discovered that the taxonomy terms without a language (because it's the same label for every language) gives the link toward a page in the ...
0
votes
1answer
445 views

Query returns 0 rows on JQGrid filter due to translated rows

I have a JQGrid table that can be displayed in different languages. The data for this table is stored as English text and translated when output. The JQGrid table can be filtered by text. The issue I ...
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
vote
3answers
1k views

Field collection translation

My site has a number of content types that have Field Collection fields. All of these field collection fields allow more than one value. I've marked the content types as translatable, and the field ...
1
vote
1answer
468 views

problems with entity translation insert hook

I'm using the entity_translation_insert() hook to set the value of a field when a node is translated. I can successfully edit the $entity from within the implementation, but how should I save the ...
0
votes
1answer
107 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 ...
0
votes
1answer
19 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 ...
2
votes
2answers
424 views

How to translate strings available in JS library?

I'm showing some images on my site where those are displayed using jquery.magnific-popup.min.js library. I'm not able to translate a string in that library. i.e. "%curr% of %total%" It is not ...
1
vote
1answer
498 views

Place the language switch in the main menu bar

The language switch appears on the bottom of the page. How can I move it to the main menu?
0
votes
2answers
550 views

XML sitemap in Multilingual site

How to configure xml sitemap for multi language site.For translation I am using i18n module and for xml sitemap. Now there are only one link show in NL site map and 26 in default language.
0
votes
0answers
30 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 ...
0
votes
1answer
512 views

Programmatically translate taxonomy terms

I have a vocabulary of taxonomy terms I get through taxonomy_term_load($tid); and displays in views page. How do I get and display the terms depending on the user's language?
1
vote
1answer
484 views

Reorganize Language Switcher based on Country/Region

I'm working on a site with 34+ languages and will likely be expanding to more. With this many countries, a simple drop-down list can be difficult for usability. I would like to customize the language ...