diff options
| author | Alberto <[email protected]> | 2017-12-29 10:31:28 +0100 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2017-12-30 18:01:36 +0200 |
| commit | bcc62232d85c23e07e44163b773c4bb5b138dd47 (patch) | |
| tree | 16db002bb723c7d6c1b91c99c25e7b4cccc7a27e /docs | |
| parent | daf9d15e2dfd001481525f400dcefd899a3e94c2 (diff) | |
| download | bootstrap-bcc62232d85c23e07e44163b773c4bb5b138dd47.tar.xz bootstrap-bcc62232d85c23e07e44163b773c4bb5b138dd47.zip | |
Updated docs for translating "Browse" text into other languages
"Choose file ..." text is now written inside the label tag, so the translation is outside the css scope.
$custom-file-text variable should only contain "Browse" translations.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/4.0/components/forms.md | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/docs/4.0/components/forms.md b/docs/4.0/components/forms.md index e5a568b67..8dc2d4e1b 100644 --- a/docs/4.0/components/forms.md +++ b/docs/4.0/components/forms.md @@ -1081,18 +1081,12 @@ We hide the default file `<input>` via `opacity` and instead style the `<label>` #### Translating or customizing the strings -The [`:lang()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:lang) is used to allow for easy translation of the "Browse" and "Choose file..." text into other languages. Simply override or add entries to the `$custom-file-text` SCSS variable with the relevant [language tag](https://en.wikipedia.org/wiki/IETF_language_tag) and localized strings. The English strings can be customized the same way. For example, here's how one might add a Spanish translation (Spanish's language code is `es`): +The [`:lang()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:lang) is used to allow for easy translation of the "Browse" text into other languages. Simply override or add entries to the `$custom-file-text` SCSS variable with the relevant [language tag](https://en.wikipedia.org/wiki/IETF_language_tag) and localized strings. The English strings can be customized the same way. For example, here's how one might add a Spanish translation (Spanish's language code is `es`): {% highlight scss %} $custom-file-text: ( - placeholder: ( - en: "Choose file...", - es: "Seleccionar archivo..." - ), - button-label: ( - en: "Browse", - es: "Navegar" - ) + en: "Browse", + es: "Navegar" ); {% endhighlight %} |
