Add an Option of Showing Flags in Locale dropdown
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
It can be an option in docusaurus.config.js to show the flags of each locale as emoji characters for better compatibility.
I have a dilemma for this feature though
- Arguably, the flag of England is the most appropriate flag to represent the English language. But how recognizable is the English flag?
- However, often the British flag is used to represent English. Within Britain, other languages other than English are spoken — including Welsh and Scottish Gaelic.
- Often the United States flag is used to represent English — and while the USA has far more English speakers than Britain, English does not originate from the United States.
Maybe an optional Unicode character also can be embedded in the config like how it’s used in below :
https://www.npmjs.com/package/emoji-flags
{
"code": "DK",
"emoji": "🇩🇰",
"unicode": "U+1F1E9 U+1F1F0",
"name": "Denmark",
"title": "flag for Denmark"
}
But it may help #7409 also.
Has this been requested on Canny?
No response
Motivation
To make an improvement in locale dropdown and #7409
API design
No response
Have you tried building it?
No response
Self-service
- I’d be willing to contribute this feature to Docusaurus myself.
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
JSF RichFaces locale dropdown list with flag icons
I'm developing a JSF web appication using RichFaces library. Application supports different locales, and user is able to change them by ...
Read more >Best practice for presenting languages
When presenting links to content in different languages, consider the following: Always use the name of the language in its local format.
Read more >Replace the Magento language selector with flag icons - Atwix
Choose one of them, such as 'German'. Then, click on the 'General' tab. On the general setting page, expand the 'Locale Options' section....
Read more >Choosing the Flags for Your Site's Languages - WPML
Adding Custom Languages for Countries that Speak the Same Language ... Now that we know how to select the flag, let's look at...
Read more >How to flag, label, and rate photos in Lightroom Classic
To show flags and labels in the thumbnail cells of the Grid view, choose View > View ... select Show Rating Footer in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, that’s a construction barrier. And yes, if we make this an API it should be more easily portable.
Also, if we support this API, it should probably support strings, HTMLs, and images.
agree we should have this and make a poc
This post provides a very lightweight way to get an emoji from a country code:
https://dev.to/jorik/country-code-to-flag-emoji-a21
we can start with something opinionated and then see which options make sense?