Thread Tools Display Modes
10-25-15, 05:02 PM   #1
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Translating keyboard layout

Hello. I need help translating keyboard layouts for my new keyboard module in ConsolePort.
The only languages I have so far are Swedish and English.
This is what it looks like:

  • A language table contains 8 sets of 4 buttons, each having 4 strings inside.
  • To swap the character sets, the user holds down L1 or L2 or L1 and L2 together.
  • The keyboard module defaults to the second string.
  • The sets are rendered clockwise.
  • Inside a set, the rendering order is counterclockwise.
This is what the table for English looks like:

Lua Code:
  1. -- Lua format
  2. Language.English = {
  3.     [1] = {
  4.         {"A", "a", "1", "/s"},
  5.         {"B", "b", "2", "/p"},
  6.         {"C", "c", "3", "/i"},
  7.         {"D", "d", "4", "/g"},
  8.     },
  9.     [2] = {
  10.         {"E", "e", "5", "/y"},
  11.         {"F", "f", "6", "/w"},
  12.         {"G", "g", "7", "/e"},
  13.         {"H", "h", "8", "/r"},
  14.     },
  15.     [3] = {
  16.         {"I", "i", "9", "´"},
  17.         {"J", "j", "<", "^"},
  18.         {"K", "k", "0", "`"},
  19.         {"L", "l", ">", "¨"},
  20.     },
  21.     [4] = {
  22.         {"M", "m", "@", "¤"},
  23.         {"N", "n", "&", "#"},
  24.         {"O", "o", "$", "€"},
  25.         {"P", "p", "%", "£"},
  26.     },
  27.     [5] = {
  28.         {"Q", "q", "/", "½"},
  29.         {"R", "r", "(", "["},
  30.         {"S", "s", "\\", "\|"},
  31.         {"T", "t", ")", "]"},
  32.     },
  33.     [6] = {
  34.         {"U", "u", "+", "§"},
  35.         {"V", "v", "*", "{"},
  36.         {"W", "w", "=", "¿"},
  37.         {"X", "x", "/", "}"},
  38.     },
  39.     [7] = {
  40.         {"Y", "y", "{rt1}", "{rt1}"},
  41.         {"Z", "z", "{rt2}", "{rt2}"},
  42.         {"\"", "'", "{rt3}", "{rt3}"},
  43.         {"_", "-", "{rt4}", "{rt4}"},
  44.     },
  45.     [8] = {
  46.         {"!", "!", "{rt5}", "{rt5}"},
  47.         {":", ".", "{rt6}", "{rt6}"},
  48.         {":", ",", "{rt7}", "{rt7}"},
  49.         {"?", "?", "{rt8}", "{rt8}"},
  50.     },
  51. }
  52.  
  53. --[[ Readable format
  54. A    a   1   /s
  55. B    b   2   /p
  56. C    c   3   /i
  57. D    d   4   /g
  58.  
  59. E    e   5   /y
  60. F    f   6   /w
  61. G    g   7   /e
  62. H    h   8   /r
  63.  
  64. I    i   9   ´
  65. J    j   <   ^
  66. K    k   0   `
  67. L    l   >   ¨
  68.  
  69. M    m   @   ¤
  70. N    n   &   #
  71. O    o   $   €
  72. P    p   %   £
  73.  
  74. Q    q   /   ½
  75. R    r   (   [
  76. S    s   \   |
  77. T    t   )   ]
  78.  
  79. U    u   +   §
  80. V    v   *   {
  81. W    w   =   ¿
  82. X    x   /   }
  83.  
  84. Y    y   {rt1}   {rt1}
  85. Z    z   {rt2}   {rt2}
  86. "    '   {rt3}   {rt3}
  87. _    -   {rt4}   {rt4}
  88.  
  89. !    !   {rt5}   {rt5}
  90. :    .   {rt6}   {rt6}
  91. :    ,   {rt7}   {rt7}
  92. ?    ?   {rt8}   {rt8}
  93. ]]--
Note: {rtX} are raid markers.
__________________

Last edited by MunkDev : 10-26-15 at 09:36 PM.
  Reply With Quote
10-26-15, 02:17 AM   #2
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Out of curiosity - why aren't you just using the supported WoW languages? Swedish isn't one of those...
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
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
10-26-15, 08:21 AM   #4
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
I can provide you the hungarian (magyar) alphabet, however i'm not sure you can fit that into your addon:

--
A, Á, B, C, D, E, É, F, G, H, I, Í, J, K, L, M, N, O, Ó, Ö, Ő, P, Q, R, S, T, U, Ú, Ü, Ű, V, W, X, Y, Z
a, á, b, c, d, e, é, f, g, h, i, í, j, k, l, m, n, o, ó, ö, ő, p, q, r, s, t, u, ú, ü, ű, v, w, x, y, z
--


Meanwhile you can learn a bit more about hungary here:
http://imgur.com/gallery/4TGU6bq

Last edited by Resike : 10-26-15 at 08:24 AM.
  Reply With Quote
10-26-15, 11:38 AM   #5
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by Resike View Post
I can provide you the hungarian (magyar) alphabet, however i'm not sure you can fit that into your addon:

--
A, Á, B, C, D, E, É, F, G, H, I, Í, J, K, L, M, N, O, Ó, Ö, Ő, P, Q, R, S, T, U, Ú, Ü, Ű, V, W, X, Y, Z
a, á, b, c, d, e, é, f, g, h, i, í, j, k, l, m, n, o, ó, ö, ő, p, q, r, s, t, u, ú, ü, ű, v, w, x, y, z
--


Meanwhile you can learn a bit more about hungary here:
http://imgur.com/gallery/4TGU6bq
Lol. Well, the cap is 128 combinations. Hungarian only needs ~70 if you count both lower and upper case. The problem is fitting all 35 characters into one set of 32 buttons. Some of them will have to be accessed by holding L2 or L1+L2.
__________________
  Reply With Quote
12-08-15, 07:21 AM   #6
saxitoxin
A Theradrim Guardian
 
saxitoxin's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 60
Norwegian and danish support

You could add the norwegian and danish Ææ Øø Åå to the addon
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » UI Screenshots, Feedback and Design Discussion » Translating keyboard layout

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off