getPo example

return __DIR__ . '/../../../fixtures/config_install/multilingual.tar.gz';
  }

  /** * {@inheritdoc} */
  protected function prepareEnvironment() {
    parent::prepareEnvironment();
    // Place custom local translations in the translations directory and fix up     // configuration.     mkdir($this->publicFilesDirectory . '/translations', 0777, TRUE);
    file_put_contents($this->publicFilesDirectory . '/translations/drupal-8.0.0.es.po', $this->getPo('es'));
    $locale_settings = Yaml::decode(file_get_contents($this->siteDirectory . '/config/sync/locale.settings.yml'));
    $locale_settings['translation']['use_source'] = 'local';
    $locale_settings['translation']['path'] = $this->publicFilesDirectory . '/translations';
    file_put_contents($this->siteDirectory . '/config/sync/locale.settings.yml', Yaml::encode($locale_settings));
  }

  /** * Confirms that the installation installed the configuration correctly. */
  public function testConfigSync() {
    $comparer = $this->configImporter()->getStorageComparer();
    
/** * {@inheritdoc} */
  protected $profile = 'standard';

  /** * {@inheritdoc} */
  protected function setUpLanguage() {
    // Place custom local translations in the translations directory.     mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.eo.po', $this->getPo('eo'));

    parent::setUpLanguage();

    $this->translations['Save and continue'] = 'Save and continue eo';
  }

  /** * Returns the string for the test .po file. * * @param string $langcode * The language code. * * @return string * Contents for the test .po file. */

  protected $langcode = 'de';

  /** * {@inheritdoc} */
  protected function visitInstaller() {
    // Place a custom local translation in the translations directory.     mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));

    // The unrouted URL assembler does not exist at this point, so we build the     // URL ourselves.     $this->drupalGet($GLOBALS['base_url'] . '/core/install.php' . '?langcode=' . $this->langcode);

    // The language should have been automatically detected, all following     // screens should be translated already.     $this->assertSession()->buttonExists('Save and continue de');
    $this->translations['Save and continue'] = 'Save and continue de';

    // Check the language direction.
'theme' => 'claro',
        ],
      ],
    ];
    // File API functions are not available yet.     $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/my_distro';
    mkdir($path, 0777, TRUE);
    file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info));

    // Place a custom local translation in the translations directory.     mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
  }

  /** * {@inheritdoc} */
  protected function setUpLanguage() {
    // This step is skipped, because the distribution profile uses a fixed     // language.   }

  /** * {@inheritdoc} */

  protected $profile = 'testing_multilingual';

  /** * {@inheritdoc} */
  protected function prepareEnvironment() {
    parent::prepareEnvironment();
    // Place custom local translations in the translations directory.     mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.es.po', $this->getPo('es'));
  }

  /** * Returns the string for the test .po file. * * @param string $langcode * The language code. * * @return string * Contents for the test .po file. */
// cSpell:disable-next-line     $this->assertSession()->pageTextContains('Quiche mediterrĂ¡neo profundo');
  }

  /** * {@inheritdoc} */
  protected function setUpLanguage() {
    // Place custom local translations in the translations directory to avoid     // getting translations from localize.drupal.org.     mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.es.po', $this->getPo('es'));

    parent::setUpLanguage();
  }

  /** * Returns the string for the test .po file. * * @param string $langcode * The language code. * * @return string * Contents for the test .po file. */

  protected $langcode = 'de';

  /** * {@inheritdoc} */
  protected function setUpLanguage() {
    // Place a custom local translation in the translations directory.     mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));

    parent::setUpLanguage();

    // After selecting a different language than English, all following screens     // should be translated already.     $this->assertSession()->buttonExists('Save and continue de');
    $this->translations['Save and continue'] = 'Save and continue de';

    // Check the language direction.     $this->assertSession()->elementTextEquals('xpath', '/@dir', 'ltr');
  }

  

  protected $profile = 'testing_multilingual';

  /** * {@inheritdoc} */
  protected function setUpLanguage() {
    // Place custom local translations in the translations directory.     mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
    file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.es.po', $this->getPo('es'));

    parent::setUpLanguage();
  }

  /** * Returns the string for the test .po file. * * @param string $langcode * The language code. * * @return string * Contents for the test .po file. */
'install' => [
          'theme' => 'claro',
        ],
      ],
    ];
    // File API functions are not available yet.     $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/my_distro';
    mkdir($path, 0777, TRUE);
    file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info));
    // Place a custom local translation in the translations directory.     mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
    file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.fr.po', $this->getPo('fr'));
  }

  /** * {@inheritdoc} */
  protected function visitInstaller() {
    // Pass a different language code than the one set in the distribution     // profile. This distribution language should still be used.     // The unrouted URL assembler does not exist at this point, so we build the     // URL ourselves.
Home | Imprint | This part of the site doesn't use cookies.