Jump to content
  • 0

[Question]Multilanguage quest.


Bayles_20

Question

Hi Community,

 

 

I have a question that haunts me for days.

 

I have a local (singapore)folder, all in Italian, with quest etc.

I have translated the entire folder in English, for testing.

 

Now I would like to load the folder in English (singapore_english) from quest, main_quest_liv1.quest.

 

 

There is a feature that allows it?

 

 

Thanks all! :D

Link to comment
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

It's not possible and system confused in this situations. But there are another methods. :D

 

you can use to assert or dofile functions. This like locale.lua 

 

locale_english.lua

locale_turkish.lua

locale_hungary.lua

 

Like this :D

 

Example : 

 

you are add these codes on your settings.lua

dofile("locale/english/locale_english.lua")
dofile("locale/english/locale_turkish.lua")
dofile("locale/english/locale_german.lua")
dofile("locale/english/locale_french.lua")

after

 

a function for multi language

		function say_withlanguage(txt)
			local languages = {"turkey","english","german","french"}
			local txts = "locale_"..data[pc.getf("mLanguage","language")].."."..txt
			say(txts)
		end

example quest

quest mLanguage begin
	state start begin
		when 20354.chat."Test" begin
			say_withlanguage("testmode")
		end
	end
end

locale.lua

locale_english = {}
locale_turkish = {}
locale_french = {}
locale_german = {}

locale_english.testmode = "Test"
locale_turkish.testmode = "Deneme"
locale_german.testmode = "Unknown"
locale_french.testmode = "Unknown"

Kind Regards

HaveBeen

Plain logic saves lives.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.