You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It adds `types: ["@angular/localize"]` in the TypeScript configuration files.
10
+
It also adds line `/// <reference types="@angular/localize" />` at the top of the `main.ts` file which is the reference to the type definition.
11
+
12
+
HELPFUL: For more information about `package.json` and `tsconfig.json` files, see [Workspace npm dependencies][GuideNpmPackages] and [TypeScript Configuration][GuideTsConfig]. To learn about Triple-slash Directives visit [Typescript Handbook](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-).
13
+
14
+
If `@angular/localize` is not installed and you try to build a localized version of your project (for example, while using the `i18n` attributes in templates), the [Angular CLI][CliMain] will generate an error, which would contain the steps that you can take to enable i18n for your project.
15
+
16
+
## Options
17
+
18
+
| OPTION | DESCRIPTION | VALUE TYPE | DEFAULT VALUE
19
+
|:--- |:--- |:------ |:------
20
+
|`--project`| The name of the project. |`string`|
21
+
| `--use-at-runtime` | If set, then `$localize` can be used at runtime. Also `@angular/localize` gets included in the `dependencies` section of `package.json`, rather than `devDependencies`, which is the default. | `boolean` | `false`
22
+
23
+
For more available options, see `ng add` in [Angular CLI][CliMain].
24
+
25
+
## What's next
26
+
27
+
<docs-pill-row>
28
+
<docs-pillhref="guide/i18n/locale-id"title="Refer to locales by ID"/>
29
+
</docs-pill-row>
30
+
31
+
[CliMain]: cli"CLI Overview and Command Reference | Angular"
Copy file name to clipboardExpand all lines: adev-es/src/content/guide/i18n/add-package.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,31 @@
1
-
# Add the localize package
1
+
# Agregar el paquete localize
2
2
3
-
To take advantage of the localization features of Angular, use the [Angular CLI][CliMain]to add the `@angular/localize`package to your project.
3
+
Para aprovechar las características de localización de Angular, usa el [CLI de Angular][CliMain]para agregar el paquete `@angular/localize`a tu proyecto.
4
4
5
-
To add the `@angular/localize` package, use the following command to update the `package.json`and TypeScript configuration files in your project.
5
+
Para agregar el paquete `@angular/localize`, usa el siguiente comando para actualizar los archivos `package.json`y de configuración de TypeScript en tu proyecto.
It adds`types: ["@angular/localize"]`in the TypeScript configuration files.
10
-
It also adds line`/// <reference types="@angular/localize" />`at the top of the `main.ts` file which is the reference to the type definition.
9
+
Esto agrega`types: ["@angular/localize"]`en los archivos de configuración de TypeScript.
10
+
También agrega la línea`/// <reference types="@angular/localize" />`al inicio del archivo `main.ts`, que es la referencia a la definición de tipos.
11
11
12
-
HELPFUL: For more information about `package.json`and`tsconfig.json` files, see [Workspace npm dependencies][GuideNpmPackages]and [TypeScript Configuration][GuideTsConfig]. To learn about Triple-slash Directives visit [Typescript Handbook](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-).
12
+
ÚTIL: Para más información sobre los archivos `package.json`y`tsconfig.json`, consulta [Dependencias npm del espacio de trabajo][GuideNpmPackages]y [Configuración de TypeScript][GuideTsConfig]. Para aprender sobre las directivas Triple-slash visita el [Manual de TypeScript](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-).
13
13
14
-
If`@angular/localize`is not installed and you try to build a localized version of your project (for example, while using the `i18n`attributes in templates), the [Angular CLI][CliMain]will generate an error, which would contain the steps that you can take to enable i18n for your project.
14
+
Si`@angular/localize`no está instalado e intentas construir una versión localizada de tu proyecto (por ejemplo, mientras usas los atributos `i18n`en templates), el [CLI de Angular][CliMain]generará un error que contendrá los pasos que puedes seguir para habilitar i18n en tu proyecto.
15
15
16
-
## Options
16
+
## Opciones
17
17
18
-
| OPTION | DESCRIPTION | VALUE TYPE | DEFAULT VALUE
18
+
| OPCIÓN | DESCRIPCIÓN | TIPO DE VALOR | VALOR PREDETERMINADO
19
19
|:--- |:--- |:------ |:------
20
-
|`--project`|The name of the project. |`string`|
21
-
| `--use-at-runtime` | If set, then`$localize`can be used at runtime. Also`@angular/localize`gets included in the `dependencies`section of `package.json`, rather than `devDependencies`, which is the default. | `boolean` | `false`
20
+
|`--project`|El nombre del proyecto. |`string`|
21
+
| `--use-at-runtime` | Si se establece, entonces`$localize`puede usarse en runtime. Además`@angular/localize`se incluye en la sección `dependencies`de `package.json`, en lugar de `devDependencies`, que es el valor predeterminado. | `boolean` | `false`
22
22
23
-
For more available options, see`ng add`in [Angular CLI][CliMain].
23
+
Para más opciones disponibles, consulta`ng add`en el [CLI de Angular][CliMain].
24
24
25
-
## What's next
25
+
## Próximos pasos
26
26
27
27
<docs-pill-row>
28
-
<docs-pillhref="guide/i18n/locale-id"title="Refer to locales by ID"/>
28
+
<docs-pillhref="guide/i18n/locale-id"title="Referirse a configuraciones regionales por ID"/>
29
29
</docs-pill-row>
30
30
31
31
[CliMain]: cli"CLI Overview and Command Reference | Angular"
If `myapp` is the directory that contains the distributable files of your project, you typically make different versions available for different locales in locale directories.
4
+
For example, your French version is located in the `myapp/fr` directory and the Spanish version is located in the `myapp/es` directory.
5
+
6
+
The HTML `base` tag with the `href` attribute specifies the base URI, or URL, for relative links.
7
+
If you set the `"localize"` option in [`angular.json`][GuideWorkspaceConfig] workspace build configuration file to `true` or to an array of locale IDs, the CLI adjusts the base `href` for each version of the application.
8
+
To adjust the base `href` for each version of the application, the CLI adds the locale to the configured `"subPath"`.
9
+
Specify the `"subPath"` for each locale in your [`angular.json`][GuideWorkspaceConfig] workspace build configuration file.
10
+
The following example displays `"subPath"` set to an empty string.
Typical deployment of multiple languages serve each language from a different subdirectory.
17
+
Users are redirected to the preferred language defined in the browser using the `Accept-Language` HTTP header.
18
+
If the user has not defined a preferred language, or if the preferred language is not available, then the server falls back to the default language.
19
+
To change the language, change your current location to another subdirectory.
20
+
The change of subdirectory often occurs using a menu implemented in the application.
21
+
22
+
For more information on how to deploy apps to a remote server, see [Deployment][GuideDeployment].
23
+
24
+
IMPORTANT: If you are using [Server rendering](guide/ssr) with `outputMode` set to `server`, Angular automatically handles redirection dynamically based on the `Accept-Language` HTTP header. This simplifies deployment by eliminating the need for manual server or configuration adjustments.
25
+
26
+
### Nginx example
27
+
28
+
The following example displays an Nginx configuration.
Copy file name to clipboardExpand all lines: adev-es/src/content/guide/i18n/deploy.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,37 +1,37 @@
1
-
# Deploy multiple locales
1
+
# Desplegar múltiples configuraciones regionales
2
2
3
-
If`myapp`is the directory that contains the distributable files of your project, you typically make different versions available for different locales in locale directories.
4
-
For example, your French version is located in the `myapp/fr`directory and the Spanish version is located in the `myapp/es` directory.
3
+
Si`myapp`es el directorio que contiene los archivos distribuibles de tu proyecto, normalmente haces que diferentes versiones estén disponibles para diferentes configuraciones regionales en directorios de configuración regional.
4
+
Por ejemplo, tu versión en francés está ubicada en el directorio `myapp/fr`y la versión en español está ubicada en el directorio `myapp/es`.
5
5
6
-
The HTML `base`tag with the`href`attribute specifies the base URI, or URL, for relative links.
7
-
If you set the`"localize"`option in [`angular.json`][GuideWorkspaceConfig]workspace build configuration file to `true`or to an array of locale IDs, the CLI adjusts the base `href`for each version of the application.
8
-
To adjust the base `href`for each version of the application, the CLI adds the locale to the configured `"subPath"`.
9
-
Specify the`"subPath"`for each locale in your [`angular.json`][GuideWorkspaceConfig] workspace build configuration file.
10
-
The following example displays`"subPath"`set to an empty string.
6
+
La etiqueta HTML `base`con el atributo`href`especifica el URI base, o URL, para enlaces relativos.
7
+
Si estableces la opción`"localize"`en el archivo de configuración de compilación del espacio de trabajo [`angular.json`][GuideWorkspaceConfig]a `true`o a un array de IDs de configuración regional, el CLI ajusta el `href`base para cada versión de la aplicación.
8
+
Para ajustar el `href`base para cada versión de la aplicación, el CLI agrega la configuración regional al `"subPath"` configurado.
9
+
Especifica el`"subPath"`para cada configuración regional en tu archivo de configuración de compilación del espacio de trabajo [`angular.json`][GuideWorkspaceConfig].
10
+
El siguiente ejemplo muestra`"subPath"`establecido como una cadena vacía.
Typical deployment of multiple languages serve each language from a different subdirectory.
17
-
Users are redirected to the preferred language defined in the browser using the `Accept-Language` HTTP header.
18
-
If the user has not defined a preferred language, or if the preferred language is not available, then the server falls back to the default language.
19
-
To change the language, change your current location to another subdirectory.
20
-
The change of subdirectory often occurs using a menu implemented in the application.
16
+
El despliegue típico de múltiples idiomas sirve cada idioma desde un subdirectorio diferente.
17
+
Los usuarios son redirigidos al idioma preferido definido en el navegador usando el encabezado HTTP `Accept-Language`.
18
+
Si el usuario no ha definido un idioma preferido, o si el idioma preferido no está disponible, entonces el servidor recurre al idioma predeterminado.
19
+
Para cambiar el idioma, cambia tu ubicación actual a otro subdirectorio.
20
+
El cambio de subdirectorio a menudo ocurre usando un menú implementado en la aplicación.
21
21
22
-
For more information on how to deploy apps to a remote server, see [Deployment][GuideDeployment].
22
+
Para más información sobre cómo desplegar aplicaciones a un servidor remoto, consulta [Despliegue][GuideDeployment].
23
23
24
-
IMPORTANT: If you are using [Server rendering](guide/ssr)with`outputMode`set to`server`, Angular automatically handles redirection dynamically based on the `Accept-Language` HTTP header. This simplifies deployment by eliminating the need for manual server or configuration adjustments.
24
+
IMPORTANTE: Si estás usando [Renderizado del servidor](guide/ssr)con`outputMode`establecido en`server`, Angular maneja automáticamente la redirección dinámicamente basándose en el encabezado HTTP `Accept-Language`. Esto simplifica el despliegue al eliminar la necesidad de ajustes manuales del servidor o configuración.
25
25
26
-
### Nginx example
26
+
### Ejemplo de Nginx
27
27
28
-
The following example displays an Nginx configuration.
28
+
El siguiente ejemplo muestra una configuración de Nginx.
0 commit comments