protected function FileTranslation::getTranslationFilesPattern
protected FileTranslation::getTranslationFilesPattern($langcode = NULL)
Provides translation file name pattern.
Parameters
string $langcode: (optional) The language code corresponding to the language for which we want to find translation files.
Return value
string String file pattern.
File
- core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php, line 87
Class
- FileTranslation
- File based string translation.
Namespace
Drupal\Core\StringTranslation\TranslatorCode
protected function getTranslationFilesPattern($langcode = NULL) { // The file name matches: drupal-[release version].[language code].po // When provided the $langcode is use as language code. If not provided all // language codes will match. return '!drupal-[0-9a-z\.-]+\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!'; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation!Translator!FileTranslation.php/function/FileTranslation::getTranslationFilesPattern/8.1.x