WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   UI Screenshots, Feedback and Design Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=144)
-   -   Translating keyboard layout (https://www.wowinterface.com/forums/showthread.php?t=52836)

MunkDev 10-25-15 05:02 PM

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.

Torhal 10-26-15 02:17 AM

Out of curiosity - why aren't you just using the supported WoW languages? Swedish isn't one of those...

MunkDev 10-26-15 03:25 AM

Quote:

Originally Posted by Torhal (Post 311577)
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

Resike 10-26-15 08:21 AM

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

MunkDev 10-26-15 11:38 AM

Quote:

Originally Posted by Resike (Post 311579)
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.

saxitoxin 12-08-15 07:21 AM

Norwegian and danish support
 
You could add the norwegian and danish Ææ Øø Åå to the addon


All times are GMT -6. The time now is 01:09 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI