Jump to content

[Question]Multilanguage quest.


Recommended Posts

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
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 24

      Experimental Renderer

    2. 11

      Multi Language System

    3. 0

      [FREE DESIGN] Interface + Logo + Discord Banner and Avatar

    4. 4

      Feeding game source to LLM

    5. 0

      Quest 6/7 Problem

    6. 5

      Effect weapons

    7. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.