Language File System

@Ebanyle after "variables" change the "//" signs into "::", so it turns into:
Code:
<<variables/YEA::STATUS::PROPERTIES_COLUMN1[0][1]>>
@Ebanyle after "variables" change the "//" signs into "::", so it turns into:
I've done that, but I noticed that when the script loads the file, it turns the "::" into "//".
I even tried it in a clean project, but it seems it won't even change single modules like that D:

Code:
<<variables/YEA::SYSTEM::COMMAND_NAME>>
Sistema
1583860861941.png


Would you mind sending a clean project with your examples?
I've done that, but I noticed that when the script loads the file, it turns the "::" into "//".
I even tried it in a clean project, but it seems it won't even change single modules like that D:

Code:
<<variables/YEA::SYSTEM::COMMAND_NAME>>
Sistema
View attachment 136448

Would you mind sending a clean project with your examples?
Could be something with your encoding. What editor do you use to edit the files? Also, make sure you named your file DatabaseTextLANGUAGE, instead of plain exported DatabaseText, otherwise it won't read it (done that just now myself, when making the small demo )

Anyway, I attached a quick demo with just language script, yanfly's settings script, and quick makeshift database file. Data in Yanfly's script is default, so all changes come from databasetext file.
Could be something with your encoding. What editor do you use to edit the files? Also, make sure you named your file DatabaseTextLANGUAGE, instead of plain exported DatabaseText, otherwise it won't read it (done that just now myself, when making the small demo )

Anyway, I attached a quick demo with just language script, yanfly's settings script, and quick makeshift database file. Data in Yanfly's script is default, so all changes come from databasetext file.
Huh... That's weird! It works perfectly now????
I mean... I admit I forgot to specify the switch I was modifying.. :facepalm:
But not even the single modules were working for me, and now they are.
I always deleted the # LFS DATABASE VERSION 13 at the start because I thought it wouldn't update with it, maybe that was what I was doing wrong
Anyways, thank you so much =D
Thank you so much @ekhartpl. Your help with variable solution was great idea. I came up with script mod that allows arrays translations.

If you insert this function above/below extract_database function (~line 1480) you can simply call
Code:
extract_module(f, Vocab)
to extract all strings and arrays from the selected module. You can replace Vocab by any module you want to translate.
You should place this command call inside extract_database function.

Spoiler
def extract_module(f, mod)
mod.constants.each { |c|
value = mod.const_get(c)

if value.is_a?(Array)
i = 0
value.each do |v|
f.write("\n")
f.write("<<variables/#{mod.to_s}::#{c}[#{i}]>>\n")
f.write(v + "\n")
i += 1
end

next
end

next if !value.is_a?(String)
f.write("\n")
f.write("<<constants/#{mod.to_s}/#{c}>>\n")
f.write(value + "\n")
}
end
The demo link died 🙁
DerTraveler
your demo link is dead
can you repost it please

Original thread: https://forums.rpgmakerweb.com/threads/language-file-system.17964/