View Single Post
03-08-13, 12:39 AM   #13
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
That's not my quote, Aason! LOL anyway...

Yes, once again, Phanx is correct about the first line in my example code. I left out the table part because it didn't seem required to illustrate. Here is an example of that first line as I use it in FeedTillers:
Lua Code:
  1. -- both of these are variables, and can be named anything
  2. -- I could have written local JoeBob, Clyde = ...
  3. -- but the names I chose are more meaningful
  4. -- ADDON is a string derived from FeedTillers.toc
  5. -- L is a table that I use for localization
  6. local ADDON, L = ...
  7.  
  8. local LOCALE = GetLocale()
  9. if LOCALE == "esES" then
  10. L["CLICK_SORT"] = "Clic para alternar entre ordenar por nombre de PNJ o nombre de comida."
  11. L["SHIFT_DOWN"] = "Mayús-clic para ocultar a los Labradores que ya ha alimentado hoy."
  12. L["ToC/Description"] = "Mostrar cuál comida le gusta cada miembro de los Labradores, y si ha completado su misión diaria \"Un plato para...\""
  13.  
  14. elseif LOCALE == "esMX" then
  15. L["CLICK_SORT"] = "Clic para alternar entre ordenar por nombre de PNJ o nombre de comida."
  16. L["SHIFT_DOWN"] = "Mayús-clic para ocultar a los Labradores que ya ha alimentado hoy."
  17. L["ToC/Description"] = "Mostrar cuál comida le gusta cada miembro de los Labradores, y si ha completado su misión diaria \"Un plato para...\""
  18.  
  19. elseif LOCALE == "itIT" then
  20. L["CLICK_SORT"] = "Click sul plugin per elencare i Coltivatori per il nome o per il loro oggetto"
  21. L["SHIFT_DOWN"] = "Tieni premuto il tasto <Shift> per nascondere i Contivatori giŕ sfamati"
  22. L["ToC/Description"] = "Indica quale Coltivatore, che cibo gli piace, e se lo hai giŕ sfamato oggi con la quest \"Un piatto per...\""
  23.  
  24. elseif LOCALE == "ptBR" then
  25. -- L["CLICK_SORT"] = ""
  26. -- L["SHIFT_DOWN"] = ""
  27. -- L["ToC/Description"] = ""
  28.  
  29. elseif LOCALE == "frFR" then
  30. -- L["CLICK_SORT"] = ""
  31. -- L["SHIFT_DOWN"] = ""
  32. -- L["ToC/Description"] = ""
  33.  
  34. elseif LOCALE == "deDE" then
  35. -- L["CLICK_SORT"] = ""
  36. -- L["SHIFT_DOWN"] = ""
  37. -- L["ToC/Description"] = ""
  38.  
  39. elseif LOCALE == "ruRU" then
  40. -- L["CLICK_SORT"] = ""
  41. -- L["SHIFT_DOWN"] = ""
  42. -- L["ToC/Description"] = ""
  43.  
  44. elseif LOCALE == "zhCN" then
  45. --@localization(locale="zhCN", format="lua_additive_table)@
  46. elseif LOCALE == "zhTW" then
  47. -- L["CLICK_SORT"] = ""
  48. -- L["SHIFT_DOWN"] = ""
  49. -- L["ToC/Description"] = ""
  50.  
  51. else
  52. L["CLICK_SORT"] = "Click the plugin to sort by Tiller name or item name"
  53. L["SHIFT_DOWN"] = "Hold the <Shift> key and click to hide already fed Tillers"
  54. end

Please note that line 45 in the above code refers to Curseforge's and WoWAce's Localization app keyword substitutions.
  Reply With Quote