My apologies - I got waylaid, but I am looking at the Wiki now.
Hmmm... I don't see how I could edit the Wiki, so be prepared for a bunch of nit-picky posts.
For example, at:
Monastery Framework · Kezarus-tech/Monastery-Framework_GM2 Wiki · GitHub
could you consider changing:
"As long as you can use the sprites and objects as they are"
to
" Although you can use the sprites and objects as they are"
OK. The Wiki has a menu in this order:
It seems to me as if "Monastery Framework" sould come before "Functions" as it comes across as a "Welcome" first page. Indeed, on the "Home" page these pages are listed that way:
See, I told you I was going to pick nits.
IMO "Functions" is an unwelcoming reference-style page - it would be nicer to have a gentle "This is what to do first" page right after the "Monastery Framework" page.
If I skip ahead, because things don't seem to be in order, to the "Objects" page very quickly I get the idea I can put an "objGUILabel" object on my page. So I do, then I run it and get the following error:
############################################################################################
ERROR in
action number 1
of Create Event
for object objGUILabel:
global variable name 'language_font' index (100063) not set before reading it.
at gml_Object_objGUILabel_Create_0 (line 5) - fontType = global.language_font;
############################################################################################
gml_Object_objGUILabel_Create_0 (line 5)
OK, I think. With the minimal (pathetic, small) GUI that I put together using Samspade's old tutorials I know I need to put a "manager" or "controller" object on the room first (and a second, different one if I want to add keyboard control). So I theorise that I sould look around more for the "welcome - let's get started" page.
Is it "Language Support"? This looks like it has some early steps to gently lead me, so I'm going to theorise.
Steps:
1. I imported your whole package, so all of your language files are "included files", including "English.txt"
2. OK, I searched for pnlLanguage and checked the Create event - again, it includes :
arrLanguages[0] = "English";
Do I need to create an instance of this object? I'll leave it for now as I'm not told to.
3. At the begining of the archive put the font-family that it should use. Like so: |LATIN
I'm sorry, I don't understand that. What's "the archive"?
"beginning" should be "beginning"
I'll do a search. I THINK step 3 should be worded something like:
3. At the start of the lang_load script (in Framework->Essentials->Language) specify the font-family that should be used. For example:
global.language_font_family = "LATIN";
This (^) I have, and it's my best guess so on to step 4.
4. There are some fonts there, I'm going to assume they're OK as a starting point.
5. This font family is setup by lang_font_load. So be sure that they are correct
OK, yes - I can see where that happens but... I can't see how the German or Portugese languages are selected.
6. The language archive is a key/value pair separeted by "|"(pipe). So if you want a text in portuguese to apear saying "Goodbye", you shoud use: Goodbye|Até mais. This makes easier for you when coding some text instead of adding a cryptic key like: 556|Até mais. It works but will drive you crazy in the long run. So put a key text that makes sense!
I would suggest:
The language archive is a key/value pair separated by "|"(pipe). So if you want some text in portuguese to apear saying "Goodbye", you shoud use: Goodbye|Até mais. This makes it easier for you when coding some text instead of adding a cryptic key like: 556|Até mais. It works but will drive you crazy in the long run. So put a key text that makes sense!
I think I can ignore that for just putting a label in a room (my current first test).
7. Whenever you want a text to show it many translations setup by the Language Support just use the lang() function. And give it the key that you want. your code should be like this at the end: var text = lang("Goodbye");
OK, not something I need to do now...
We now go on to other paragraphs.
"These variables shoud NEVER be changed outside of the Framework. Don't do it."
OK - please change to:
" These variables should NEVER be changed outside of the Framework. Don't do it."
Otherwise, warning noted.
"You can (and should!!!) modify this screen for your game. The only important things is that you need to call lang_load() passing the archive name without the extension."
AH!
Maybe I need to call lang_load to initialize the language in order for my label to work? Let's try it in the room creation.
Except - what does "archive" mean here?
Let me look at the lang_load function...
OK, it's looking for the name of the language file without the extension - so in my case "English".
In the room Creation Code I put:
lang_load("English");
It would be nice if argument0 for the function were documented.
Save it, run it, I get this error again:
___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object objGUILabel:
global variable name 'language_font' index (100063) not set before reading it.
at gml_Object_objGUILabel_Create_0 (line 5) - fontType = global.language_font;
############################################################################################
gml_Object_objGUILabel_Create_0 (line 5)
There are various things I could try more-or-less at random, but honestly... I'm lost
I've removed the code I put in the room's Creation Code because that obviously didn't help.
What next boss?