Good day,

I am trying to work out how to show a specific alert message based on the URL the user is viewing.

The alert message will be different for each URL (ie: the alert message will be in French for users viewing any page on domain .com/fr/ and Japanese for users viewing domain .com/ja/ , etc..)

For example:

a./ The user is viewing a page on railsaver .co.uk/de/ (German)

b./ Script detects this and displays message saying “Sie können Bahntickets online zu buchen, auch wenn Sie nicht im Vereinigten Königreich leben, sondern muss auswählen, um die Tickets aus dem Bahnhof zu sammeln.”

To prevent the user been shown the alert message repeatedly the script will need to have session based cookie.

Any assistance will be very much appreciated.

Thanks.