lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Interface Downloads Discussion > Released Interfaces (L)

Reply
 
Thread Tools Display Modes
  #1  
Unread 05-21-2018, 04:27 AM
glafria's Avatar
glafria glafria is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Dec 2015
Location: Germany , Wiesbaden
Posts: 33
I think the error occours of a little mistake


this should work

Code:
L=Turbine.Engine.GetLocale();

At line 1 in the language.lua is used an : before GetLocale
__________________
Glafria, an old old human healing minestrel.
She is a member of an Legion on Gwaihir


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Glafria, eine alte heilende Menschenfrau.

Sie ist ein ehrbares Mitglied einer Allianz auf Gwaihir.
Reply With Quote
  #2  
Unread 05-21-2018, 09:25 AM
Ledviper's Avatar
Ledviper Ledviper is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Jul 2008
Location: Ottawa, Ontario, Canada
Posts: 6
any reference to Turbine.Engine.GetLocale() I've found says it returns the OS locale, admittedly most posts are pretty old so maybe it changed idk.

http://www.lotrointerface.com/downlo...=oldest&page=7

https://www.lotro.com/en/forums/show...ine.GetLocale()

http://www.lotrointerface.com/wiki/GetLocale

the first link indicates Turbine.Engine.GetLanguage() should be used, and ya, the colon seems like a typo, again i'm not uh fluent in lua, but it did seem to still work.
Reply With Quote
  #3  
Unread 05-21-2018, 09:36 AM
glafria's Avatar
glafria glafria is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Dec 2015
Location: Germany , Wiesbaden
Posts: 33
In the language.lua you found this
Code:
L=Turbine.Engine:GetLocale();
and not the correct syntax
Code:
L=Turbine.Engine.GetLocale();
__________________
Glafria, an old old human healing minestrel.
She is a member of an Legion on Gwaihir


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Glafria, eine alte heilende Menschenfrau.

Sie ist ein ehrbares Mitglied einer Allianz auf Gwaihir.
Reply With Quote
  #4  
Unread 05-21-2018, 12:09 PM
Ledviper's Avatar
Ledviper Ledviper is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Jul 2008
Location: Ottawa, Ontario, Canada
Posts: 6
Quote:
Originally Posted by glafria
In the language.lua you found this
Code:
L=Turbine.Engine:GetLocale();
and not the correct syntax
Code:
L=Turbine.Engine.GetLocale();
both forms work.
I used Locale Emulator to run lotro with Japanese locale and received the same error with both forms.

replacing that line with the following is how it should be, I've tested it with Japanese locale, still downloading French and German languages to test those:
Code:
L = Turbine.Engine:GetLanguage();
if L == 0 or L == 2 or L == 268435457 then L = "en";
elseif L == 268435459 then L = "fr";
elseif L == 268435460 then L = "de"; 
elseif L == 268435463 then L = "ru"; end
Code is from Pulse's comment
Reply With Quote
  #5  
Unread 05-21-2018, 02:02 PM
Thurallor's Avatar
Thurallor Thurallor is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 202
Code:
Turbine.Engine.GetLocale();
Turbine.Engine:GetLocale();
Since the function takes no arguments, the two are effectively the same. In the second case, Turbine.Engine is implicitly passed as the first argument. So, the following two are exactly equivalent:

Code:
Turbine.Engine:GetLocale();
Turbine.Engine.GetLocale(Turbine.Engine);
There is a corresponding shorthand that can be used when defining functions. From the Lua 5.1 manual:

Quote:
The colon syntax is used for defining methods, that is, functions that have an implicit extra parameter self. Thus, the statement
function t.a.b.c:f (params) body end
is syntactic sugar for
function t.a.b.c.f (self, params) body end

Last edited by Thurallor : 05-21-2018 at 02:08 PM.
Reply With Quote
Reply



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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Filter' icons in Quest Log D: Eoblaed Interface Help (L) 2 11-27-2017 06:51 PM


All times are GMT -5. The time now is 02:38 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui