Created
June 28, 2024 22:55
-
-
Save szepeviktor/3f593bd868aa94e15fbcd5bb98142952 to your computer and use it in GitHub Desktop.
Get Google Translate language codes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://translate.google.com/ | |
Array.from(document.querySelectorAll("[role=listbox][aria-labelledby=ucj-4] [role=group] [role=option][data-language-code]")).map(elem => elem.getAttribute("data-language-code")).join(","); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment