- Home /
How to type spanish accents in UI text
Hey everyone, so I'm making this Spanish game to help learn accents. The game is 2D, which I doubt matters. So here's the thing, some spanish letters need to have a little thing on the top like this: á, é, í, ó, ú, ñ. I've been using Microsoft Word to copy and paste the letters when needed, but it's just a pain to do this over and over again. Is there something on the asset store, some sort of script to write, anything besides copying and pasting? I'm sure there's got to be an easier or less tedious way to accomplish this. I was thinking of making some script that when I push CTRL or something and a vowel, it would give me the spanish letter, but I'm not sure how to do that. Any help you guys would have would be very helpful. Thanks and keep on developing :). P.S: I will provide more details if needed.
Answer by Harinezumi · Feb 07, 2018 at 11:13 AM
This isn't really a Unity question, but I'll answer...
Why don't you add Spanish keyboard layout in your OS and switch to it when you need to type accented letters? I use several languages this way, and it takes a while to get used to it, but it's fast.
Once you have Spanish layout, to type accented letters you first hit ' key and then the letter that you want to accent, e.g. á, é, í, ó, ú. You can even achieve the less used ü letter (and other variations) hitting " before typing the second part.
You're lucky you don't need to write Hungarian... :P
Your answer is pretty good. I had not thought about that, and it actually worked. So I'll explain what I did. So I went on https://www.windowscentral.com/how-change-your-keyboard-layout-windows-10 and followed those steps. I'm running Windows 10, so I'm not sure if that matters. Once everything is installed, on the bottom right it should say "ENG", just switch it to SPANISH and it should work. Note: most if not all of the special characters on the keyboard will be moved around depending on the language, I chose Spanish $$anonymous$$éxico and the { key was the one used for accents. So you have to click the { key and then the vowel that you want. For the ñ you have to click the ; key. Still not sure how to do the U with two dots on top, but will post as soon as I do. Here's the accents if you wish to copy and paste them. Áá Éé Íí Óó Úú Ñn.
Oh, you are right, my answer was valid for the Traditional Spanish keyboard layout. For the $$anonymous$$exican Spanish you should get Ü by hitting shift+{ and then U.
You can see the keyboard layouts easily if you open the On-screen keyboard (Start menu, and just start typing "on screen keyb". Btw, that is also a solution for entering these exotic characters.
Your answer
Follow this Question
Related Questions
UI Text compression on android 1 Answer
Render Debug.Log as UI Text 2 Answers
What's your equivalent of old GUIStyle ? 0 Answers
Canvas is flipping, 2D game 0 Answers