Loc Notes


LOCALIZATION NOTES:

This second project was a bit easier in a way because I just followed what I already set up with myself on the first one and tried to keep some consistency to it.

The same thing for the title, I like to keep the OG title and included a subtitle as a translation.
I only needed to alter the images for the title and prompt with a close enough font and replace them in the images/title folder. (Again, since this are personal projects for me to extend my learning and creating a portfolio, close enough at the moment is good enough since I'm more focused on the localization and code part of it)

For the subtitle I could ave done a new image/sprite/animation for it, but since it was something I felt already confident in my learnings and implementation for a demo I made, I didn't felt the need to do it in particular for this case.

For the code alterations I only messed in heightDisplay.lua and heightDialog.lua.
heightDisplay just to alter the Height on the top left.

heightDialog to localize the "game over text", I altered the text and once again had to alter the font to be able to have the character for 'á'. I know I replaced ' for á in the image, so the spacing is not the exact spacing, but yeah was good enough, and more importantly no overlaps, so is readable.

But what I noticed when I tested is if I just changed my font on for the drawText function that was generation the Max Height, it would loose the bold text for when it was a NEW max height.
So for that my solution was implement it as a family.
First I just copied the bold and italic .fnt and images from the SDK resource folder and paste in my recent created font folder. Then in the beginning of the heightDialog code out of the functions I set it as a family to include my own font alterations:

local fontPaths = {
    [gfx.font.kVariantNormal]  = "fonts/myFont",
    [gfx.font.kVariantBold] = "fonts/myFont-Bold",
    [gfx.font.kVariantItalic] = "fonts/MyFont-Oblique"
    }
local fontFamily = gfx.font.newFamily(fontPaths)
gfx.setFontFamily(fontFamily)

And that way, besides replacing the English text for the Portuguese text I didn't have to alter anything else for the bold and italic work, so could leave everything as gfx.drawText, since my new family was being set at the beginning.

And that was that! one more done :)

---

Any comments, suggestions or anything just give me a wee shout on marcelo.terreiro@gmail.com

love
mama

Leave a comment

Log in with itch.io to leave a comment.