Adding an en_GB Locale and UK flag to Channel Manager

168 views
Skip to first unread message

Gareth Price

unread,
Oct 25, 2017, 7:34:18 AM10/25/17
to Hippo Community

Good afternoon, 

So here is my situation:
  • I have added a new Channel which has a mount hst:locale of en_GB
  • I am using  hippo cms 11
  • Currently the flag is a icon of a globe. I am assuming because this locale does not exist in Hippo
  • I have visited this help page and can see that the list of locales does not include GB
  • I have tested other flags, and they appear fine. 
  • How would I get the UK flag?(the Use Custom Icons section did not clearly explain exactly how to do this)

Hope you can help

Many Thanks

Jasper Floor

unread,
Oct 25, 2017, 7:45:30 AM10/25/17
to Hippo Community
Hi,

You need to add an icon [1]. 

Or you can use en_UK.


--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Gareth Price

unread,
Oct 25, 2017, 8:26:03 AM10/25/17
to hippo-c...@googlegroups.com
Thanks Jasper,

Im still having a little trouble.

I tried using en_UK but I still see the "globe" icon.

I have the following node set up in my localeProviderService:

gb
 - country : gb
- language: en

I also had a look for the path...

cms/src/main/resources/org/hippoecm/frontend/translation/icons/flags/

...but this does not exist in my CMS module

I did a search for flags, and I can see that both sizes have been created for the UK 

e.g. 

.m2/repository/org/onehippo/cms7/hippo-cms-translation-frontend/4.2.1/hippo-cms-translation-frontend-4.2.1.jar!/org/hippoecm/frontend/translation/icons/flags/flag-16_gb.png

I just need to be able to point to them correctly.

Any idea what I may need to tweak?

You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/Hpv9trpL_Fc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-community+unsubscribe@googlegroups.com.

Jasper Floor

unread,
Oct 25, 2017, 10:01:00 AM10/25/17
to Hippo Community
Hi,

the locale in this case corresponds to the node directly under: /hippo:configuration/hippo:frontend/cms/cms-services/localeProviderService

So you could try a locale "en".
You could also create a node en_UK (or en_GB) if you want those locales.


You won't find cms/src/main/resources/org/hippoecm/frontend/translation/icons/flags/ in your project, but it exists in a library. You can create this path and add an icon flag-11x9_xx.png where xx is the name of the node under localeProviderService.

You probably should use en_GB. I reccomend either use locale en or create a node en_GB.

mvg,
Jasper

Gareth Price

unread,
Oct 25, 2017, 11:54:29 AM10/25/17
to hippo-c...@googlegroups.com
Hey Jasper,

Sorry, I am a little confused. I have this:
__________________________________________
     

hst:hosts
+ dev-localhost
| + localhost
|   + hst:root
|     + fr
|       - fr
|         - hst:locale : fr_FR
|     + es
|       - es
|         - hst:locale : es_ES
|     + nl
|       - nl
|         - hst:locale : nl_NL
|     + gb
|       - en
|         - hst:locale : en_GB  {{Section A}}   

__________________________________________
     

+ localServiceProvider
|  - fr
|    - country  : fr
|    - language : fr
|  - es
|    - country  : es
|    - language : es
|  - nl
|    - country  : nl
|    - language : nl
|  - gb
|    - country  : gb
|    - language : en

__________________________________________
     

With this current setup, I can change  {{Section A}} to fr_FR, I would get the French flag on the channel icon in channel manager. If I changed to es_ES, I get the Spanish flag. If I change to de_DE, I get the German flag... etc etc

  • en_GB is not getting the UK flag, 
  • en_UK is not getting the UK flag either. 

It seems that Hippo already has the UK flag here:

.m2/repository/org/onehippo/cms7/hippo-cms-translation-frontend/4.2.1/hippo-cms-translation-frontend-4.2.1.jar!/org/hippoecm/frontend/translation/icons/flags/flag-16_gb.png

What is it that I would need to change here?


I am not sure which node you are referring to that needs to be changed. 

Jasper Floor

unread,
Oct 26, 2017, 3:51:47 AM10/26/17
to Hippo Community
The locale set on the content folder is leading for the cms. This has to be since there is a separation of content and presentation. So the hst:locale isn't relevant in this case. You should set the locale on the content folder to be equal to name of the node under localeProviderService. The country will determine the flag.

mvg,
Jasper

Gareth Price

unread,
Oct 26, 2017, 5:36:58 AM10/26/17
to hippo-c...@googlegroups.com
Hi Jasper,

I had already done that and the content folder will show the UK flag. However the channel icon continues to have the globe image.

Inline image 2

Inline image 3
Inline image 4
Inline image 5
Inline image 6


Can you see anything from these screen shots that might shed some light?

Thanks
Gareth

--

William Borg Barthet

unread,
Oct 26, 2017, 5:46:33 AM10/26/17
to hippo-c...@googlegroups.com
Hi Gareth,

you should be able to customise the icons for the channels. Just add the icons as images in the gallery and then reference them in the configuration:


Hope this helps! 

You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.



--

William Borg Barthet
SOLUTION ARCHITECT / TRAINER
 william.borgbarthet@bloomreach.com
+35677119449

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 71 Summer Street, Boston, MA 02110

DE +49 170 4074731
NL +31 20 522 44 66
US +1 877 414 47 76 (toll free)
www.onehippo.com
www.onehippo.org

Jasper Floor

unread,
Oct 26, 2017, 5:55:04 AM10/26/17
to Hippo Community
As you can see from the page William referenced, we don't have a channel icon for UK. Sorry about that.

mvg,
Jasper

Gareth Price

unread,
Oct 26, 2017, 6:42:13 AM10/26/17
to hippo-c...@googlegroups.com
Hi William,

I am finding that document impossible to follow. 

  • I have created an new folder in the gallery and added the flag image to it:

  • How do I now configure my channel to use this image?

Thanks
Gareth


William Borg Barthet

unread,
Oct 26, 2017, 6:54:24 AM10/26/17
to hippo-c...@googlegroups.com
I agree it's hard to understand, I will create an issue to improve that documentation.

In the meantime, go to this node in the console:

/hippo:configuration/hippo:frontend/cms/hippo-channel-manager/channel-manager-perspective/channel-list

add a property called channelRegionIconPath with value /content/gallery/channels/flag-en_gb.png/flag-en_gb.png/hippogallery:original

To make sure all of the icons for all of the channels work, you should match the filename with the region name, so set channelRegionIconPath to /content/gallery/channels/${region}.png/${region}.png/hippogallery:original

and change the path of the icon image to /content/gallery/channels/en_GB.png.

I'm not 100% sure about what the region string looks like, but you should be able to find that out from the logs.

Apologies for the gap in the documentation.

William

Gareth Price

unread,
Oct 26, 2017, 7:00:21 AM10/26/17
to Hippo Community
Ok... I have worked it out.

I think the documentation could do with a bit more clarity here. Simply by adding information such as:

  1. List of out the box flags hippo is shipped with  (You kind of have this already)
  2. How to create a customer icon
    • Create a folder in your image gallery called "channels"
    • Add your new icon to this folder (my_image.png)
    • Make sure your hst:locale property has the value of your image name without the .png (my_image)

Its these little bits of information that can save a whole bag of time.

Thanks for all your help.

William Borg Barthet

unread,
Oct 26, 2017, 7:01:45 AM10/26/17
to hippo-c...@googlegroups.com
Thanks for the feedback Gareth. I have created https://issues.onehippo.com/browse/PRODDOCS-1291 for this.

Thanks again

Wojciech Oledzki

unread,
Oct 27, 2017, 3:15:06 AM10/27/17
to Hippo Community
Thanks!!

Both thumbs up for taking your time and writing down the simple steps here. You've just saved me a lot of time.

Thanks again.
You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/Hpv9trpL_Fc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.



--

William Borg Barthet
SOLUTION ARCHITECT / TRAINER
 william.borgbarthet...@bloomreach.com

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/Hpv9trpL_Fc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages