Template talk:Flag

From Europa Universalis 4 Wiki
Jump to navigation Jump to search

Flag for TAG[edit]

Could we add the possibility to insert the TAG and not the Country name? For example {{flag|FRA}} will do Flag of France France. Stigni (talk) 10:50, 21 June 2015 (CEST)

It'd have to be a separate template; doing it that way would be far far less efficient since it'd need a switch table several hundred entries long. ~ Meneth (talk) 12:21, 21 June 2015 (CEST)
Okay, I see the advantage off such a template. SUS is much shorter than Susquehannock. But then we have the cryptic country tags in the wikitext. I know that {{flag|Iroquois}} displays the flag and name of Iroquois nation. But do I also know the tag of Iroquois? IRQ or IRO? Or vice versa, which flag displays {{TAG|SOF}}? Sofala? – Lillebror (talk) 12:06, 3 July 2015 (CEST)
My idea is to make a template that translate the TAG in the flag/name of the country. For example you are adding some event/mission: there is TAG = JAI, "what is JAI?!?!", you have to open Countries and check that is Malta; with this template you can first add {{TAG|JAI}}, that generate Flag of Malta Malta, and then chenge it with {{flag|Malta}}.
I made a draft of this template [[User:Stigni/sandbox/Template:TAG]]. Stigni (talk) 13:00, 3 July 2015 (CEST)
Prehaps substitution can help us: {{subst:User:Stigni/sandbox/Template:TAG|ENG}}: Flag of England England – Lillebror (talk) 13:48, 3 July 2015 (CEST)
I didn't know that exist an automatic substitution. For me now is perfect. Stigni (talk) 13:59, 3 July 2015 (CEST)
That substitution results in carrying over the entire switch table as wiki code. Not ideal. ~ Meneth (talk) 14:00, 3 July 2015 (CEST)
Nevermind. Ignore that. ~ Meneth (talk) 14:01, 3 July 2015 (CEST)

Second Parameter[edit]

I made, on my sandbox, a template that let you have link with adjective: {{User:Stigni/sandbox/Template:Flag|England|English}}.

I think is a good upgrade for this template, because right now we can only have Flag of England or Flag of England England. Stigni (talk) 10:01, 3 July 2015 (CEST)

Looks goof, if somewhat specialised in use. Meneth will this be a performance bottleneck or is it ok to add? Dauth (talk) 10:06, 3 July 2015 (CEST)
As the flag provides a link I don't see a great improvement in this change. E.g. The Flag of England English primary interest is ... (But if all like it. ...) – Lillebror (talk) 11:47, 3 July 2015 (CEST)
Since the user specifies the adjective, that's not a performance issue. Only some sort of lookup would be.
It could be useful in some contexts I suppose, like writing "English ideas" with the flag template rather than ending up with "England ideas".
But Lillebror's point is definitely a good one. ~ Meneth (talk) 12:09, 3 July 2015 (CEST)
For me was not so obvius that the flag has the link, because I prefer to click on the blue link. However with this template you can write {{flag|England|English ideas}} that generate {{User:Stigni/sandbox/Template:Flag|England|English ideas}}. Stigni (talk) 13:07, 3 July 2015 (CEST)
I'm not a big fan of the flag as the link at all (note that I just use plain links in all my edits). I prefer the classic wikipedia like blue link method. Since I doubt I'm going to be able to convince everyone to drop the flags. We should at least provide a link in the old fashioned way too. Since this does that, I'm happy to support it. Dauth (talk) 13:47, 3 July 2015 (CEST)
Dauth has a point about making links visible.
In places like lists (E.G., country list) text links get too cluttered, but most other places it is important to ensure they're properly visible. ~ Meneth (talk) 13:56, 3 July 2015 (CEST)

Non breaking space[edit]

Can we have a non breaking space in this template between the flag& and the text? Puchacz (talk) 15:54, 29 October 2015 (CET)

Yes, done. – Lillebror (talk) 18:20, 29 October 2015 (CET)

Flag Template not working on mobile[edit]

There is a persistant problem with the flag template for mobile users. The biggest perhaps is the fact that the flag doesn't even show up. I bring this up because a significant amount of our visitors to eu4 wiki can't see it. A simple change of code could fix this, and before you say "well why don't they just set their webpage to 'desktop view' on mobile?" a large portion of mobile users don't even know that exists/don't really care because the mobile format is better on mobile devices than the desktop view. Also, don't just say "it's not a big deal" because that is just a cop out for not wanting to update the code for our mobile users. ~ JackBeanstalk (talk) 21:55, 26 July 2016‎ (CEST)

It's working on my end [android]. Might be something specific to browser/OS version. ~ SolSys (talk) 17:03, 27 July 2016 (CEST)