View Single Post
10-26-15, 03:25 AM   #3
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by Torhal View Post
Out of curiosity - why aren't you just using the supported WoW languages? Swedish isn't one of those...
I'm using client locale to determine a default language, but that doesn't mean the user is satisfied with that layout. For example, as a Swedish player, I'd like to use our extended alphabet, since I can't write properly without it. There's no Swedish client, but there should definitely be a Swedish keyboard layout. The naming convention (English instead of enUS) is simply because I can use the table keys for easier dropdown creation in the config, plus it's a lot cleaner than using localization codes.
Lua Code:
  1. function Keyboard:LoadSettings()
  2.     if not ConsolePortKeyboardSettings then
  3.         local locale = GetLocale()
  4.         ConsolePortKeyboardSettings = {
  5.             Layout = Language[Language.Default[locale]] or Language.English,
  6.             Language = Language.Default[locale],
  7.         }
  8.     end
  9. end
__________________

Last edited by MunkDev : 10-26-15 at 03:42 AM.
  Reply With Quote