- Home /
Time.deltaTime using Hindi numbers?
I am converting my app into Hindi and I have the text almost done, but I could use some light onto translating the numbers. In my app, the score increasing by a certain amount every second, and that score is displayed on the screen. Is there a way to get Time.deltaTime to render Hindi numbers? Any ideas? Let me know if you need to see some of my code.
Thanks,
Stephen
Answer by tanoshimi · May 05, 2017 at 01:37 PM
Time.deltaTime is a float - it's not specific to any language or numeric system. However, when you display it on screen you cast it to a string, and it's at that point that you need to do the culture-appropriate conversion.
Not a Hindi speaker, so don't know the specifics but a cursory Google search suggests that Hindi numerals (Devanagri) for 0-9 are stored in Unicode values '\u0967' to '\u096F'. So does this print correctly for you?
char[] Hindi = {'\u0967', '\u0968', '\u0969', '\u096A', '\u096B', '\u096C', '\u096D', '\u096E', '\u096F'} ;
yourTextValue.text = Hindi[2].ToString();
Genius! I did not know you could look up the Unicode values for numbers. I just got to work so once I get home this evening I will implement those values and see what happens, and then I will let you know. Thank you! Stephen
The strings are printing correctly for me! Thank you! The point system in my game is that every second the score increases by 100, then 200 after some time, then finally, 300. Is there a Unicode value for 100, 200, and 300, in Hindi? Once I get that, I can try to implement that into time.DeltaTime. @tanoshimi
Stephen
Your answer
Follow this Question
Related Questions
Text/font color 3 Answers
GUI Label Width & Height 0 Answers
How to use special symbols 1 Answer
How to measure the width of a string? 0 Answers
Multiple Cars not working 1 Answer