Languages & flags

VanillaNeko

cXF Sponsor
Messages
17
Likes
7
Website
xentrad.fr
#1
Hello everybody,

I wonder if it would be possible to replace the language selection box, the text with an image (flag) of the corresponding language ?

Thank you in advance for your answers.

Sincerely VanillaNeko.
 

VanillaNeko

cXF Sponsor
Messages
17
Likes
7
Website
xentrad.fr
#3
Thank you for your answer Bassman, I saw your add-on.

But I'm afraid he has not fit my idea to replace the text link by link with an image without using awesome icon.

If you confirm me that it is possible, I excuse me in advance.

I added that the changes will not be made on the default theme XenForo.
 

BassMan

Staff member
Administrator
Messages
775
Likes
404
Website
www.customizexf.com
#4
Sorry, my mistake. You need it with an image.

Try this:

Open footer template and find:
Code:
<dd><a href="{xen:link 'misc/language', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase language_chooser}" rel="nofollow">{$visitorLanguage.title}</a></dd>

Replace with:
Code:
<dd><a href="{xen:link 'misc/language', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase language_chooser}" rel="nofollow"><img src="styles/.../your_flag_image.png" alt="Choose Language"></a></dd>
I think that should do it to change phrase with an image. After click it will normally open the selection box.

It's an example above, but I recommend you to create a template modification for this, don't edit templates directly.
 

VanillaNeko

cXF Sponsor
Messages
17
Likes
7
Website
xentrad.fr
#6
As promised, I just give you a return.

The modification is good, thank you again.

:heart_eyes:
:heart_eyes:

By cons when I click on the flag and the selection box opens to select the language, I would again bring up the flag.


Is it possible ?

I thank you in advance.
 
Last edited:

BassMan

Staff member
Administrator
Messages
775
Likes
404
Website
www.customizexf.com
#7
That one is a bit tricky. Not sure... try adding the code for flag:
Code:
<img src="styles/.../your_flag_image.png" alt="French Language">
... to phrase for French language.

No, that will not work... forget it.
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Top