Getting Data In

How to make "en-GB" default in url?

kavraja
Path Finder

Hi,

I've gone through a number of documents on this without finding success.

At the moment my date format is mm/dd/yy with "en-US" in my url but I want to change it to dd/mm/yy. I have gone through other splunk answers and got this working through changing the url to "en-GB" but I have to do this every time i log back into splunk.

Is there a way of making the "en-GB" default in the url or any other method of changing the date format so that by default it shows up as dd/mm/yy?

Thanks in advance.

Tags (1)
0 Karma
1 Solution

ryantzj
Explorer

Hi there Kavraja,

You can set en-GB as default in url by simply changing the language setting in i18n.py file under directory below

Splunk 5.x

splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/i18n.py

Splunk 6.x

Splunk/Python-2.7/Lib/site-packages/splunk/appserver/mrsparkle/lib/il8n.py

And simply change en-US to en-GB, it will take effect once you restart your splunk

 locales = parse_accept_languages(request.headers.get('accept-language', 'en-US'))

Hope this helps.

View solution in original post

ryantzj
Explorer

Hi there Kavraja,

You can set en-GB as default in url by simply changing the language setting in i18n.py file under directory below

Splunk 5.x

splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/i18n.py

Splunk 6.x

Splunk/Python-2.7/Lib/site-packages/splunk/appserver/mrsparkle/lib/il8n.py

And simply change en-US to en-GB, it will take effect once you restart your splunk

 locales = parse_accept_languages(request.headers.get('accept-language', 'en-US'))

Hope this helps.

andrewtobin
Engager

Thanks for this answer - but how is this not a setting in the server? This is something that half the world would need. Seems like something that would be expected to be a simple flag.

MuS
SplunkTrust
SplunkTrust

Hi @andrewtobin, this is indeed annoying. Some time ago I found a little Chrome plug-in ( Link in here https://answers.splunk.com/answers/206129/is-it-possible-to-change-the-date-format-when-runn.html ) which makes that with for you from en-US to en-GB for example. Another approach is to run an Apache Web server as reverse proxy in front of Splunk and rewrite the URL - example can be found here: http://blogs.splunk.com/2016/02/04/sso-without-an-active-directory-or-ldap-provider/

cheers, MuS

0 Karma

ryantzj
Explorer

if thats the case, maybe you want to try this solution.

http://answers.splunk.com/answers/10265/change-default-web-ui-locale.html

I am using version 6.1.4 too, and altering il8n.py is working good for me.

0 Karma

kavraja
Path Finder

Yeah I know these should work but doesn't seem to for me for some very strange reason. Will need to test this on a different machine. I've made a workaround in the mean time by manually putting in en-GB in the url and saving it as a bookmark. This seems to remain on en-GB every time I log back in and out 😕

Thanks for all your help ryantzj.

0 Karma

kavraja
Path Finder

Hey ryantzj,
I tried this and changed it to "en-GB" but the en-US still shows up in the url and date format still the same even after restarting the machine and splunk. Not sure what I'm doing wrong 😞
Using splunk 6.1.4

0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>