Commit bcc62232 authored by Alberto's avatar Alberto Committed by XhmikosR
Browse files

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.
parent daf9d15e
Showing with 3 additions and 9 deletions
+3 -9
...@@ -1081,18 +1081,12 @@ We hide the default file `<input>` via `opacity` and instead style the `<label>` ...@@ -1081,18 +1081,12 @@ We hide the default file `<input>` via `opacity` and instead style the `<label>`
#### Translating or customizing the strings #### 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 %} {% highlight scss %}
$custom-file-text: ( $custom-file-text: (
placeholder: ( en: "Browse",
en: "Choose file...", es: "Navegar"
es: "Seleccionar archivo..."
),
button-label: (
en: "Browse",
es: "Navegar"
)
); );
{% endhighlight %} {% endhighlight %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment