Projet

Général

Profil

Révision e4c061ad

Ajouté par Assos Assos il y a plus de 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/i18n/i18n_string/i18n_string.inc
166 166
   * Get translation to language from string object
167 167
   */
168 168
  public function get_translation($langcode) {
169
    if (empty($this->translations[$langcode])) {
169
    if (!isset($this->translations[$langcode])) {
170 170
      $translation = $this->textgroup()->load_translation($this, $langcode);
171 171
      if ($translation && isset($translation->translation)) {
172 172
        $this->set_translation($translation, $langcode);
......
1234 1234
   */
1235 1235
  public function translate($langcode, $options = array()) {
1236 1236
    // We may have it already translated. As objects are statically cached, translations are too.
1237
    if (empty($this->translations[$langcode])) {
1237
    if (!isset($this->translations[$langcode])) {
1238 1238
      $this->translations[$langcode] = $this->translate_object($langcode, $options);
1239 1239
    }
1240 1240
    return $this->translations[$langcode];

Formats disponibles : Unified diff