Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
6

I'm scripting a basic translating script, but doesn't work. Please help?

Asked by 8 years ago

Some of you may know that ROBLOX shipped a new fonts system which is supported by UTF-8. (I think) So I wanted to create a basic translate script, where there's a welcoming GUI saying, "Hello, how are you" and it can be translatable to "¿Hola cómo estás?" (Also, if you're curious about the new fonts system that has been shipped, check it out here: http://devforum.roblox.com/t/new-fonts-system-shipped/23237

But any who, the problem is that when you click Spanish (Or Español it'll say...) It comes in blank, but when you click the English button, it shows the translated text (which again, is "Hello, how are you?") And then clicking the Spanish button it comes in blank again.

For more of a visual of it, I'll provide the pictures that I think are necessary and the script that I created.

Pictures: Link 1 (The objects inside the Explorer): http://prntscr.com/adrp7r Link 2 (The menu of the translation): http://prntscr.com/adrqhq Link 3 (The menu after the Translate button has been clicked): http://prntscr.com/adrqns Link 4 (After the Spanish button has been clicked): http://prntscr.com/adrqu2

Script:

script.Parent:WaitForChild("TranslateButton").MouseButton1Click:connect(function()
    script.Parent.TranslateButton.Visible = false
    script.Parent.ScrollingFrame.Visible = true 

end)

script.Parent.ScrollingFrame:WaitForChild("English").MouseButton1Click:connect(function()
    script.Parent.OutputText.Text = "Hello, how are you?"   

end)

script.Parent.ScrollingFrame:WaitForChild("Spanish").MouseButton1Click:connect(function()
    script.Parent.OutputText.Text = "¿Hola cómo estás?" 

end)

Hope you're able to understand and help me.

Thank you!

~NanotechSci

0
What might be happening is that *Lua* doesn't support UTF-8 characters, so the string on line 13 is getting read as an empty string. Try changing that string and see if it's still not working. adark 5487 — 8y
0
Hello, so I tried testing it out with regular characters, (which is "Hola, como estas" but without the special characters.) And it works... So I'm guessing Lua doesn't support it, or something? And if so... Do you know when it'll be supported? NanotechSci 40 — 8y
0
AFAIK, Lua supports the "local typeset" for the language it's being tooled for. ROBLOX is tooled for en-US typesets, so that's probably what Lua is configured to. I don't know much about implementing Lua, or how RBX.Lua is implemented specifically, so it could be as soon as they notice the bug and switch some config flag, it could be some months down the line, it could be a week from now. No way t adark 5487 — 8y
0
The characters are supported by Lua. You can print that string to the output no problem, but the fonts used on the GUIs have not be updated to support these character sets and the unknown characters just get ignored.  They are working on updating the fonts, but there is no public timetable for their release. BlackJPI 2658 — 8y
View all comments (2 more)
0
Okay, thanks for your help! NanotechSci 40 — 8y
0
You can edit the .Text property directly in the Properties window to make this work. It's just that editing .Text via script/command bar doesn't work. XAXA 1569 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Right now, I believe you cannot do this currently do to the characters/font you have. ROBLOX is currently working on that stuff.

end --of message :)--
Ad

Answer this question