diff options
| author | Mark Otto <[email protected]> | 2018-01-14 23:19:12 -0800 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2018-01-15 09:19:12 +0200 |
| commit | fa3de5cbd8f73d2cbffc0c722c996b8a13b44c5d (patch) | |
| tree | ff2a4f438f8d30c0192b2f48e86b7afe5f506078 /docs/4.0 | |
| parent | 14bd7d748939008947a635e87d0e50103a1ad8dd (diff) | |
| download | bootstrap-fa3de5cbd8f73d2cbffc0c722c996b8a13b44c5d.tar.xz bootstrap-fa3de5cbd8f73d2cbffc0c722c996b8a13b44c5d.zip | |
Add example of a Spanish translation for custom file input (#25302)
Diffstat (limited to 'docs/4.0')
| -rw-r--r-- | docs/4.0/components/forms.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/4.0/components/forms.md b/docs/4.0/components/forms.md index 4735bd9a5..a51693e14 100644 --- a/docs/4.0/components/forms.md +++ b/docs/4.0/components/forms.md @@ -1162,8 +1162,17 @@ The [`:lang()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:l {% highlight scss %} $custom-file-text: ( en: "Browse", - es: "Navegar" + es: "Elegir" ); {% endhighlight %} +Here's `lang(es)` in action on the custom file input for a Spanish translation: + +{% example html %} +<div class="custom-file"> + <input type="file" class="custom-file-input" id="customFileLang" lang="es"> + <label class="custom-file-label" for="customFileLang">Seleccionar Archivo</label> +</div> +{% endexample %} + You'll need to set the language of your document (or subtree thereof) correctly in order for the correct text to be shown. This can be done using [the `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) on the `<html>` element or the [`Content-Language` HTTP header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.12), among other methods. |
