]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Updated docs for translating "Browse" text into other languages
authorAlberto <albermav@gmail.com>
Fri, 29 Dec 2017 09:31:28 +0000 (10:31 +0100)
committerXhmikosR <xhmikosr@gmail.com>
Sat, 30 Dec 2017 16:01:36 +0000 (18:01 +0200)
"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.

docs/4.0/components/forms.md

index e5a568b67b05796a75c5e365410c830b2a26ea43..8dc2d4e1b755a6d19727690255a26c05e88c2677 100644 (file)
@@ -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 %}