diff --git a/PlexRequests.Resources/PlexRequests.Resources.csproj b/PlexRequests.Resources/PlexRequests.Resources.csproj
index 4499431cf..2b4d447c8 100644
--- a/PlexRequests.Resources/PlexRequests.Resources.csproj
+++ b/PlexRequests.Resources/PlexRequests.Resources.csproj
@@ -48,10 +48,17 @@
+
+
+
+
+
+
PublicResXFileCodeGenerator
UI.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Log ind
+
+
+ Ønsker du at se en film eller tv-show, men det er i øjeblikket ikke på Plex? Log nedenfor med dit Plex.tv brugernavn og password !!
+
+
+ Dine login-oplysninger bruges kun til at godkende din Plex konto.!
+
+
+ Plex.tv Brugernavn
+
+
+ Brugernavn
+
+
+ Adgangskode
+
+
+ log på
+
+
+ Noget gik galt
+
+
+ Fuldført
+
+
\ No newline at end of file
diff --git a/PlexRequests.Resources/UI.de.resx b/PlexRequests.Resources/UI.de.resx
new file mode 100644
index 000000000..f4a0fb0fc
--- /dev/null
+++ b/PlexRequests.Resources/UI.de.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Anmelden
+
+
+ Möchten Sie einen Film oder eine TV-Show zu sehen, aber es ist derzeit nicht auf Plex? Loggen Sie sich unten mit Ihrem Plex.tv Benutzernamen und Passwort !!
+
+
+ Ihre Login-Daten werden verwendet, nur Ihr Plex Konto zu authentifizieren.!
+
+
+ Plex.tv Benutzername!
+
+
+ Benutzername
+
+
+ Passwort
+
+
+ Anmelden!
+
+
+ Irgendetwas ist falsch gelaufen
+
+
+ Erfolg
+
+
\ No newline at end of file
diff --git a/PlexRequests.Resources/UI.es.resx b/PlexRequests.Resources/UI.es.resx
new file mode 100644
index 000000000..26660b94a
--- /dev/null
+++ b/PlexRequests.Resources/UI.es.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ INICIAR SESIÓN
+
+
+ ¿Quieres ver una película o programa de televisión, pero no es actualmente en Plex? Ingresa abajo con su nombre de usuario y contraseña Plex.tv !!
+
+
+ Sus datos de acceso sólo se utilizan para autenticar su cuenta Plex.!
+
+
+ Plex.tv nombre de usuario!
+
+
+ Username
+
+
+ Contraseña
+
+
+ Iniciar sesión
+
+
+ Algo salió mal.
+
+
+ CRÍTICOS
+
+
\ No newline at end of file
diff --git a/PlexRequests.Resources/UI.fr.resx b/PlexRequests.Resources/UI.fr.resx
new file mode 100644
index 000000000..88c16161d
--- /dev/null
+++ b/PlexRequests.Resources/UI.fr.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Se connecter
+
+
+ Vous voulez regarder un film ou la télévision, mais il est pas actuellement sur Plex? Connectez-vous ci-dessous avec votre nom d'utilisateur et mot de passe Plex.tv!
+
+
+ Vos informations de connexion sont uniquement utilisées pour authentifier votre compte Plex.
+
+
+ Plex.tv Nom d'utilisateur
+
+
+ Nom d’utilisateur
+
+
+ Mot de passe
+
+
+ Se connecter!
+
+
+ Quelque-chose s'est mal passé!
+
+
+ Succès
+
+
\ No newline at end of file
diff --git a/PlexRequests.Resources/UI.it.resx b/PlexRequests.Resources/UI.it.resx
new file mode 100644
index 000000000..29746d173
--- /dev/null
+++ b/PlexRequests.Resources/UI.it.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Login
+
+
+ Vuoi guardare un film o tv ma non è attualmente in Plex? Effettua il login con il tuo username e la password Plex.tv !!
+
+
+ I dati di accesso vengono utilizzati solo per autenticare l'account Plex.!
+
+
+ Plex.tv Nome utente!
+
+
+ Nome utente
+
+
+ Password
+
+
+ Accedi!
+
+
+ Errore
+
+
+ Successo
+
+
\ No newline at end of file
diff --git a/PlexRequests.Resources/UI.pt.resx b/PlexRequests.Resources/UI.pt.resx
new file mode 100644
index 000000000..a21345cdb
--- /dev/null
+++ b/PlexRequests.Resources/UI.pt.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Login
+
+
+ Quer assistir a um filme ou programa de TV, mas não está atualmente em Plex? Entre abaixo com seu nome de usuário e senha Plex.tv !!
+
+
+ Seus dados de login são apenas usados para autenticar sua conta Plex.!
+
+
+ Plex.tv usuário!
+
+
+ Nome de usuário
+
+
+ Senha
+
+
+ Assinar em!
+
+
+ Alguma coisa saiu errada.
+
+
+ Sucesso
+
+
\ No newline at end of file
diff --git a/PlexRequests.Resources/UI.sv.resx b/PlexRequests.Resources/UI.sv.resx
new file mode 100644
index 000000000..f5ae3b249
--- /dev/null
+++ b/PlexRequests.Resources/UI.sv.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Logga in
+
+
+ Vill du titta på en film eller TV-show, men det är inte närvarande på Plex? Logga in nedan med Plex.tv användarnamn och lösenord !!
+
+
+ Dina inloggningsuppgifter används endast för att autentisera ditt Plex-konto.!
+
+
+ Plex.tv användarnamn!
+
+
+ Användarnamn
+
+
+ Lösenord
+
+
+ Logga in!
+
+
+ Något gick fel
+
+
+ Lyckades
+
+
\ No newline at end of file
diff --git a/PlexRequests.UI/Helpers/CultureHelper.cs b/PlexRequests.UI/Helpers/CultureHelper.cs
new file mode 100644
index 000000000..e78758585
--- /dev/null
+++ b/PlexRequests.UI/Helpers/CultureHelper.cs
@@ -0,0 +1,116 @@
+#region Copyright
+// /************************************************************************
+// Copyright (c) 2016 Jamie Rees
+// File: CultureHelper.cs
+// Created By: Jamie Rees
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ************************************************************************/
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+
+namespace PlexRequests.UI.Helpers
+{
+ public class CultureHelper
+ {
+ private static readonly List ValidCultures = new List { "en-US", "de-DE", "fr-FR", "es-ES", "de", "en", "fr", "es","da","sv","it" };
+
+ private static readonly List ImplimentedCultures = new List {
+ "en-US",
+ "en",
+ "de",
+ "fr",
+ "es",
+ "da",
+ "sv",
+ "it"
+ };
+
+ ///
+ /// Returns true if the language is a right-to-left language.
+ ///
+ public static bool IsRighToLeft()
+ {
+ return Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft;
+ }
+
+ ///
+ /// Returns a valid culture name based on "name" parameter. If "name" is not valid, it returns the default culture "en-US"
+ ///
+ /// Culture's name (e.g. en-US)
+ public static string GetImplementedCulture(string name)
+ {
+ if (string.IsNullOrEmpty(name))
+ {
+ return GetDefaultCulture();
+ }
+
+ // Validate the culture
+ if (!ValidCultures.Any(c => c.Equals(name, StringComparison.InvariantCultureIgnoreCase)))
+ {
+ return GetDefaultCulture();
+ }
+
+ if (ImplimentedCultures.Any(c => c.Equals(name, StringComparison.InvariantCultureIgnoreCase)))
+ {
+ return name; // We do have the culture, lets go with it
+ }
+
+ // Find a close match.
+ var match = GetNeutralCulture(name);
+
+ foreach (var c in ImplimentedCultures.Where(c => c.StartsWith(match, StringComparison.InvariantCultureIgnoreCase)))
+ {
+ return c;
+ }
+
+ return GetDefaultCulture(); // return Default culture since we cannot find anything
+ }
+
+ ///
+ /// Returns default culture name which is the first name declared (e.g. en-US)
+ ///
+ /// Culture string e.g. en-US
+ public static string GetDefaultCulture()
+ {
+ return ImplimentedCultures[0]; // return first culture
+ }
+
+ public static string GetCurrentCulture()
+ {
+ return Thread.CurrentThread.CurrentCulture.Name;
+ }
+
+ public static string GetCurrentNeutralCulture()
+ {
+ return GetNeutralCulture(Thread.CurrentThread.CurrentCulture.Name);
+ }
+
+ public static string GetNeutralCulture(string name)
+ {
+ if (!name.Contains("-")) return name;
+
+ return name.Split('-')[0]; // Read first part only
+ }
+ }
+}
\ No newline at end of file
diff --git a/PlexRequests.UI/Modules/CultureModule.cs b/PlexRequests.UI/Modules/CultureModule.cs
new file mode 100644
index 000000000..6ce1b3a11
--- /dev/null
+++ b/PlexRequests.UI/Modules/CultureModule.cs
@@ -0,0 +1,63 @@
+#region Copyright
+// /************************************************************************
+// Copyright (c) 2016 Jamie Rees
+// File: CultureModule.cs
+// Created By: Jamie Rees
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+// ************************************************************************/
+#endregion
+using System;
+
+using Nancy;
+using Nancy.Extensions;
+using Nancy.Responses;
+
+using PlexRequests.Core;
+using PlexRequests.Core.SettingModels;
+using PlexRequests.UI.Helpers;
+
+namespace PlexRequests.UI.Modules
+{
+ public class CultureModule : BaseModule
+ {
+ private const string CookieName = "_culture";
+ public CultureModule(ISettingsService pr) : base("culture",pr)
+ {
+ Get["/culture"] = x => SetCulture();
+ }
+
+ public RedirectResponse SetCulture()
+ {
+ var culture = (string)Request.Query["culture"];
+ var returnUrl = (string)Request.Query["returnUrl"];
+
+ // Validate
+ culture = CultureHelper.GetImplementedCulture(culture);
+
+ var cookie = Request.Cookies["_culture"];
+ var response = Context.GetRedirect(returnUrl);
+
+ response.WithCookie(CookieName, cookie ?? culture, DateTime.Now.AddYears(1));
+
+ return response;
+ }
+ }
+}
\ No newline at end of file
diff --git a/PlexRequests.UI/PlexRequests.UI.csproj b/PlexRequests.UI/PlexRequests.UI.csproj
index c5681a18d..39162d60e 100644
--- a/PlexRequests.UI/PlexRequests.UI.csproj
+++ b/PlexRequests.UI/PlexRequests.UI.csproj
@@ -159,6 +159,7 @@
+
@@ -196,6 +197,7 @@
+