Setup Windows Subsystem 2 for Linux
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
If you should encounter the problem that some translations are wrongly translated with the equal source language string (for example in our case there were German translations for "Author" translated with "Author" or "Published" with "Published"), you may use the following snippet to list them.
SELECT s.lid,s.source, t.translation FROM `locales_source` s INNER JOIN locales_target t WHERE s.lid=t.lid AND CONVERT(s.source USING utf8) = CONVERT(t.translation USING utf8) AND t.customized=1
To finally delete them, you may use something like this, but make a backup before and know what you're doing!
This is the Gist repository for my article Drupal 8, How to translate Config API.
Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.
Content of this Gist :
|// Import arbitrary config from a variable.|
|// Assumes $data has the data you want to import for this config.|
|$config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html');|
|// Or, re-import the default config for a module or profile, etc.|
|# PHP 4.4.9 (cgi-fcgi) (built: Nov 7 2018 13:27:00)|
|# Copyright (c) 1997-2008 The PHP Group|
|# Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies|
|# PHP 7.1.25 (cli) (built: Dec 10 2018 10:11:36) ( NTS )|
|# Copyright (c) 1997-2018 The PHP Group|