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\Translator

Code

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$!';
}
doc_Drupal
2016-10-29 09:14:04
Comments
Leave a Comment

Please login to continue.