---
title: Editor de código: multiidioma
slug: docs/es/editor-de-codigo-multiidioma
description: Este documento ofrece un editor de código completo que permite a los usuarios exhibir y duplicar ejemplos de código sin esfuerzo. Con la capacidad de crear varias pestañas y reorganizarlas mediante un simple proceso de arrastrar y soltar, los usuarios pue
docTags: 
createdAt: 2020-11-13T12:28:51.000Z
---

Nuestro editor de código es donde usted puede mostrar ejemplos de código que pueden copiarse fácilmente.

Usted puede agregar múltiples pestañas usando el mismo lenguaje y usar arrastrar y soltar para reorganizar las pestañas.

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/THSqdEtr4ZHb3KqpazPfo_f4dgqb8.gif)

Cuando usted agrega una nueva pestaña, también puede cambiar el nombre a algo como un archivo, por ejemplo, `main.js`

Vea nuestro ejemplo:

:::CodeblockTabs
main.js

```javascript
fetch("https://api.cakes.com", {
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});

```

```go
// We can use channels to synchronize execution
// across goroutines. Here's an example of using a
// blocking receive to wait for a goroutine to finish.
// When waiting for multiple goroutines to finish,
// you may prefer to use a [WaitGroup](waitgroups).

package main

import "fmt"
import "time"

// This is the function we'll run in a goroutine. The
// `done` channel will be used to notify another
// goroutine that this function's work is done.
func worker(done chan bool) {
    fmt.Print("working...")
    time.Sleep(time.Second)
    fmt.Println("done")

    // Send a value to notify that we're done.
    done <- true
}

func main() {

    // Start a worker goroutine, giving it the channel to
    // notify on.
    done := make(chan bool, 1)
    go worker(done)

    // Block until we receive a notification from the
    // worker on the channel.
    <-done
}

```

```python
# Python3 program to demonstrate 
# the use of sample() function . 
  
# import random  
import random 
  
  
# Prints list of random items of 
# length 3 from the given list. 
list1 = [1, 2, 3, 4, 5, 6]  
print("With list:", random.sample(list1, 3)) 
  
# Prints list of random items of 
# length 4 from the given string.  
string = "GeeksforGeeks"
print("With string:", random.sample(string, 4)) 
  
# Prints list of random items of 
# length 4 from the given tuple. 
tuple1 = ("ankit", "geeks", "computer", "science", 
                   "portal", "scientist", "btech") 
print("With tuple:", random.sample(tuple1, 4)) 
  
  
# Prints list of random items of 
# length 3 from the given set. 
set1 = {"a", "b", "c", "d", "e"} 
print("With set:", random.sample(set1, 3)) 
```

```php
<?php
$name = "Quincy";
echo "Hi! My name is " . $name . "<br>";
echo "Hi! My name is " . $NAME . "<br>";
echo "Hi! My name is " . $NaMe . "<br>";
?>
```

```csharp
/*
 * C# Program to Check Whether the Entered Year is a Leap Year or Not
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Program
{
    class leapyear
    {
        static void Main(string[] args)
        {
            leapyear obj = new leapyear();
            obj.readdata();
            obj.leap();
        }
        int y;
        public void readdata()
        {
            Console.WriteLine("Enter the Year in Four Digits : ");
            y = Convert.ToInt32(Console.ReadLine());
        }
        public void leap()
        {
            if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))
            {
                Console.WriteLine("{0} is a Leap Year", y);
            }
            else
            {
                Console.WriteLine("{0} is not a Leap Year", y);
            }
            Console.ReadLine();
        }
    }
}
```
:::

## Markdown

### Bloque de código con una sola pestaña

```nodejs
var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(8080);
```

Use el siguiente Markdown para generar un bloque de código con un solo ejemplo de código:

````markdown
## Code block

```nodejs
var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(8080);
```
````

### Bloques de código sin lenguaje

:::CodeblockTabs
```text
// code block not specified
```

```text
// code block not specified
```

```text
// code block not specified
```
:::

Use el siguiente Markdown para generar un bloque de código sin especificar el lenguaje:

````markdown
## Code blocks

:::::codeblocktabs

```
// code block not specified
```

```
// code block not specified
```

```
// code block not specified
```

:::::
````

### Editor de código con múltiples pestañas

:::CodeblockTabs
```php
// PHP is the best.
```

```java
// and JAVA too
```

```go
// demo go
```

```javascript
// demo js
```
:::

Use el siguiente Markdown para generar un bloque de código con múltiples pestañas:

````markdown
## Demo Code Blocks

:::::codeblocktabs

```php
// PHP is the best.
```

```java
// and JAVA too
```

```go
// demo go
```

```javascript
// demo js
```

:::::
````

***

::::LinkArray{contentSource="CUSTOM"}
:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-C1IcmVcG0rx4ZLHX6X7V7-20250911-192557.png"}
:FontAwesome[]{icon="fa-solid fa-cubes"} &#x20;**&#x20;Encontrar otros bloques**

Descubra nuevas formas y bloques para crear páginas de documentación impresionantes y funcionales.

[Consultar todos los bloques](docId\:IzBUJGUT0bOmcbZ5hFQNX)&#x20;
:::

:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-YRyGGWKsNS1ZZJa5XJy0z-20250911-192608.png"}
:FontAwesome[]{icon="fa-solid fa-headset"}**&#x20; ¿Necesita ayuda?  ⬇️**

Utilice la **burbuja** **de chat azul&#x20;**&#x64;esde la esquina inferior derecha.

O pruebe **Chat de IA** (desde el cuadro de búsqueda) para obtener respuestas rápidas.
:::

:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-MS_ubDHlXgoktt4svD2rL-20250911-192619.png"}
:FontAwesome[]{icon="fa-solid fa-hand-holding-heart"}**&#x20;  Su opinión importa**

Utilice el siguiente formulario de comentarios, de forma anónima.

O haga una pregunta en la **sección de Preguntas y Respuestas** y nuestro equipo o la IA le dará una solución.
:::
::::

