How to highlight specific languages in Google Translate

firefoxgoogle-translate

I often translate between 5 languages in Google Translate. Is there any way to highlight those specific languages in the language selector dialogue? I'm not against using a Firefox-specific extension or userContent.css file.

Best Answer

To highlight languages in Google Translate, use each language's language code in a CSS selector to target the element. To get the CSS selector, in Firefox right-click each language and press Inspect Element. There will be a div property called data-language-code. Note that code for each language to be highlighted.

In the UserContent.css file, add the following code, using the appropriate language codes found in the previous step:

@-moz-document domain(translate.google.com) {
    /* ar en el iw ru */
    [data-language-code="ar"],
    [data-language-code="en"],
    [data-language-code="el"],
    [data-language-code="iw"],
    [data-language-code="ru"] {
        background-color:#ddffdd !important;
    }
}