Skip to content

Instantly share code, notes, and snippets.

@Berdir
Created March 23, 2017 16:50
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Berdir/89ba61d3c110e791bbbffa6c0a29be86 to your computer and use it in GitHub Desktop.
Save Berdir/89ba61d3c110e791bbbffa6c0a29be86 to your computer and use it in GitHub Desktop.
# How to force disable interface translation by overriding the locale lookup service to not be added to the translation manager
# settings.local.php:
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/services.local.yml';
# services.local.yml (add this file to .gitignore):
services:
string_translator.locale.lookup:
class: Drupal\locale\LocaleTranslation
arguments: ['@locale.storage', '@cache.default', '@lock', '@config.factory', '@language_manager', '@request_stack']
tags:
- { name: needs_destruction }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment