Use :lang() and a Sass map to deal with translations of custom file input text?
Created by: cvrebert
See https://developer.mozilla.org/en-US/docs/Web/CSS/:lang
Something along the lines of:
$custom-file-text: (
button-label: (
en: "Browse"
),
placeholder: (
en: "Choose file..."
)
) !default;
@each $lang, $text in map-get($custom-file-text, button-label) {
...:lang($lang) {
content: $text;
}
}
Folks using other languages can then set new entries in the map via their custom variables file to add their translations.
CC: @mdo for feedback