Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
WernerL
Topic Author
Posts: 7
Joined: 07 Feb 2020, 08:41

Switch from German site to English site

08 Apr 2021, 09:16

Hello Karl, 
I have the same concerns as in the post
viewtopic.php?f=53&t=9073
some time ago. 

My site
moments-in-nature.com 
has two main folders, one with German and one with similar English content. 
The user may switch either to German part of the site (Momente in der Natur) or the English part of the site (moments-in-nature) via main menu. 
The index page is a language neutral slideshow. 

Can you please tell me what I have to do to get a German flag in front of the ":flag_de: Momente in der Natur" - link 
and an English flag in front of the ":flag_gb: moments-in-nature" - link? 
I think that these flags make the language switching more visible.

Many thanks for help
Werner
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Switch from German site to English site

09 Apr 2021, 01:23

Right. It seems like you already have the language setup ready and just want the flags? You could for example use the same flags as we use in the forum, which are loaded from CDN. I did a quick test from Chrome inspector:
Image

Simply add the images into the LABELS of each of the two pages. English:
Code
<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/1f1ec-1f1e7.png" style="width: 32px;margin: -32px 5px -32px 0">moments in nature
German:
Code
<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/1f1e9-1f1ea.png" style="width: 32px;margin: -32px 5px -32px 0">Momente in der Natur
 
User avatar
WernerL
Topic Author
Posts: 7
Joined: 07 Feb 2020, 08:41

Re: Switch from German site to English site

09 Apr 2021, 02:54

Wow, Great  :relaxed:. It works fine. 
Thank you very much! You're the best support I've ever seen  :clap:.
 
User avatar
WernerL
Topic Author
Posts: 7
Joined: 07 Feb 2020, 08:41

Re: Switch from German site to English site

09 Apr 2021, 08:19

Hello Karl, 
I have an additional question:
Is ist possible for me to access this cloudflare catalog to get some other png-file names , e.g. for a HOME-icon? 
The British flag is
Code
1f1ec-1f1e7.png
... and what would be the png file name for a Home Icon? Is there a webpage where I can browse for these icons/png-filenames?

Thanks a lot
Werner
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Switch from German site to English site

10 Apr 2021, 02:14

This specific icons library doesn't actually have "nice" file names, as it was meant to replace EMOJI icons. The icons do have names that correspond with Emoji icon codes though, so you could use this as reference:
https://unicode.org/emoji/charts/full-emoji-list.html

For example, the Spanish flag:
U+1F1EA U+1F1F8 = filename 1f1ea-1f1f8.png
https://cdnjs.cloudflare.com/ajax/libs/ ... -1f1f8.png
Image

Or house (there is no "home") 1f3e0.png
Image

There are other icon libraries, but I don't know which ones are good or easy to use. Optionally, you can always download icons you want to use, and serve them directly from your own website.