---
url: 'https://metadrop.net/es/articulos/crear-variable-multi-idioma'
title: 'Crear una variable multi-idioma'
author: 'Ricardo Sanz'
date: '2017-01-17T10:17:24+00:00'
updated: '2020-05-20T12:45:37+00:00'
type: article
summary: 'Proceso de creación de una variable multi-idioma en Drupal.'
tags:
  - Multilanguage
  - Variables
image: 'https://metadrop.net/modules/custom/metadrop_schema/images/metadropnet-social.jpg'
published: true
og:
  site_name: Metadrop
  'image:type': image/jpeg
  'image:width': '1200'
  'image:height': '630'
  'image:alt': Metadrop
  locale: es_ES
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': Article
      '@id': 'https://metadrop.net/es/articulos/crear-variable-multi-idioma#article'
      name: 'Crear una variable multi-idioma'
      headline: 'Crear una variable multi-idioma'
      description: 'Proceso de creación de una variable multi-idioma en Drupal.'
      about:
        - Multiidioma
        - Variables
      image:
        '@type': ImageObject
        url: 'https://metadrop.net/modules/custom/metadrop_schema/images/metadropnet-social.jpg'
        width: '1200'
        height: '630'
      datePublished: '2014-07-21T08:00:00+0200'
      dateModified: '2020-05-20T14:45:37+0200'
      author:
        '@type': Person
        name: 'Ricardo Sanz'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
      mainEntityOfPage: 'https://metadrop.net/es/articulos/crear-variable-multi-idioma'
    -
      '@type': Organization
      '@id': 'https://metadrop.net/#organization'
      url: 'https://metadrop.net/'
      name: Metadrop
      sameAs:
        - 'https://www.drupal.org/metadrop'
        - 'https://x.com/metadrop'
        - 'https://asociaciondrupal.es/partner/metadrop'
        - 'https://www.linkedin.com/company/metadrop'
      telephone: '+34910053180'
      contactPoint:
        '@type': ContactPoint
        telephone: '+34910053180'
        email: hola@metadrop.net
        availableLanguage:
          - Spanish
          - English
        contactType: 'customer service'
      logo:
        '@type': ImageObject
        url: 'https://metadrop.net/modules/custom/metadrop_schema/images/logo-metadrop-500-500.jpg'
        width: '500'
        height: '500'
      address:
        '@type': PostalAddress
        streetAddress: 'Calle Virgen de Nuria 23'
        addressLocality: Madrid
        addressRegion: Madrid
        postalCode: '28027'
        addressCountry: ES
    -
      '@type': ItemPage
      '@id': 'https://metadrop.net/es/articulos/crear-variable-multi-idioma'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Inicio
            item: 'https://metadrop.net/es'
          -
            '@type': ListItem
            position: 2
            name: 'Artículos expertos sobre Drupal y tecnología'
            item: 'https://metadrop.net/es/articulos'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
---
 1. [Artículos](https://metadrop.net/es/articulos)
 
  

# Crear una variable multi-idioma

Lunes 21 de Julio de 2014

 

 



Proceso de creación de una variable multi-idioma en Drupal.



   



Para crear una variable multi-idioma es tan sencillo como:


```php
/**
* Implementation of hook_init().
*/
function unicef_hazte_socio_init() {
  global $conf;
  $conf['i18n_variables']['unicef_hazte_socio_form_header'] = 'unicef_hazte_socio_form_header';
}
```

Y ya tenemos nuestra variable disponible en varios idiomas. El resto de proceso es igual que si de una variable normal se tratase.



[Multiidioma](https://metadrop.net/es/articulos?text=Multiidioma)

[Variables](https://metadrop.net/es/articulos?text=Variables)

 

- Ricardo Sanz
    
    CTO