A lot of people that use Blocs App want to create a select language menu.
There is a good tutorial on youtube by Eldar Gezalov :
A select language menu is a good way to provide easy navigation between your different language version of your website.
But how to easy add the symbol flag for each country?
It’s very simple… Just add the HTML code for the emoji flag. The symbol of their country is a good UX visual effect for the end user.
In the Menu Manager, edit your country:
And the result :
The avantage to use the emoji flag, it’s that’s recognise by different browser and it’s a lightweight solution. No more image to download, it’s provide by the browser of the user.
How can i retrieve the HTML code for different country?
You can download my little application for macOS : Flags for developer
more information about Flags for developer here
For some reasons, maybe you have to create a Xojo application which need to add some features language. A Popup menu to select the language and add the flag in this menu is very easy.
Add the emoji flag for the available language to catch more easily the attention of the end user.
But, how can you make a popup menu with country flag ?
Open your Xojo project, add a popup menu control, and in the opening event, add this code :
me.AddRow(Text.FromUnicodeCodepoint(&h1F1E6) + Text.FromUnicodeCodepoint(&h1F1F9)+"Österreich") me.RowTagAt(0)="AT" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E6) + Text.FromUnicodeCodepoint(&h1F1FA)+"Australia") me.RowTagAt(1)="AU" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E7) + Text.FromUnicodeCodepoint(&h1F1EA)+"Belgique") me.RowTagAt(2)="BE" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E7) + Text.FromUnicodeCodepoint(&h1F1F7)+"Brazil") me.RowTagAt(3)="BR" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E8) + Text.FromUnicodeCodepoint(&h1F1E6)+"Canada") me.RowTagAt(4)="CA" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E8) + Text.FromUnicodeCodepoint(&h1F1ED)+"Suisse") me.RowTagAt(5)="CH" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E8) + Text.FromUnicodeCodepoint(&h1F1FE)+"Cyprus") me.RowTagAt(6)="CY" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E9) + Text.FromUnicodeCodepoint(&h1F1EA) +"Deutschland") me.RowTagAt(7)="DE" me.AddRow(Text.FromUnicodeCodepoint(&h1F1E9) + Text.FromUnicodeCodepoint(&h1F1F0)+"Denmark") me.RowTagAt(8)="DK" me.AddRow(Text.FromUnicodeCodepoint(&h1F1EA) + Text.FromUnicodeCodepoint(&h1F1EA)+"Estonia") me.RowTagAt(9)="EE" me.AddRow(Text.FromUnicodeCodepoint(&h1F1EA) + Text.FromUnicodeCodepoint(&h1F1F8)+"Espana") me.RowTagAt(10)="ES" ...
In this code i set the RowTag with the ISO3166 code for each country. It’s can be useful with some api to get the correct language (example: PayPal Api).
The code above can be continued with the all the emoji flag available.
Run the project :
With the code above, you can easily add emoji, in this case it’s emoji flag.
How to retrieve code point for country flags ?
You don’t want to look for information about the flags of the countries anymore? Unicode, ISO 3166, Hex, HTML?
With Flags for Developer, find all this information in one click.
I create this application for my personal use in first. I use it in the Paymailer app, and for some websites i own.
Search a specific country or scroll the list to find the one you want.
What is the advantage to use HTML code or Hex code in your project ? it’s recognize by the most famous web browsers.
More visiblity for the end-user, improve your app or web design with the international flag symbol.
Highlight your source code directly and automatically on your website made with Blocs App for Mac.
Works with all major languages (CSS, HTML, JS, VisualBasic, VB.net, Python, Ruby, etc…)
How to see it in action ?
It’s always a good idea to provide some example code when you develop something. And it’s better when your user can see formatted code.
To see some “hello world” code example in different language : click here
You can customize the CSS style by downloading other styles and changing them in the “Bric constructor” in developer menu.
Go on the Github Highlight.js page to download more style for this add-ons.
How to get it ?Buy it now !
You don’t know Blocs ?
It is a macOS application to build easily Theme for static or wordpress Website. With this application you can design your website as you want.
You can download it and try it for free. Go on the Blocs App website* to get the latest version.
I’m not affiliated with Blocs, but it’s a tool i like to use.
I made the choice to offer you some of my software and other creations for free.
But if you want to support me, you can offer me a coffee by clicking here *.
These donations will be used to finance my various domain names, servers, software licenses.
*With the Buymeacoffee.com platform which accepts payments by credit card, Apple Pay, Google Pay.