adding languge to the game and fonts !! please help us we want arabic languge in the game
5 replies, posted
ummm read the title !!
You can use language.Add to add phrases, but the default system doesn't let you set languages.
I wrote a simple replacement: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/classes/class_language.lua.html[/url] - remove .html to copy Lua...
Put it into addons/acecool/lua/autorun/sh_language.lua or whatever you'd like to name it. Then, simply use language.Add( id, text, optional_dictionary_language ), then to retrieve, use language.GetPhrase( id, optional_language ) and it'll allow your game-mode to be multilingual.
I am releasing a new version which removes the language/dictionary var from GetPhrase because clients will set them when they change the language, and it'll read the language automatically and the server will use the default language unless an alternative is selected. Additionally, it has string.Format support ( use language.GetPhrase( id, replacement1, replacement2, ... )
Here's the current version which still requires language in GetPhrase before the replacements: [url]https://bitbucket.org/Acecool/acecooldev_base/src/master/gamemode/shared/classes/class_language.lua?at=master[/url]
have a look at [url=https://crowdin.com/project/garrysmod]this[/url]
[QUOTE=Acecool;46684969] -shit- [/QUOTE]
Sometimes I think you are worse than a spam bot. This isn't about Lua coding.
He's asking how to "add language" to the game, "add arabic fonts", and "arabic language support".
This is the developer section where people ask for help developing / coding. I responded with the limited text there was to go on by assuming it was asking how to add multilingual language support to the game-mode he's modifying or creating. For the font, he'd need to add it to the game-mode content/resource/ directory then use surface.CreateFont to add it into the game.
What you posted requires a huge amount of work. Not only with the translations but modifying other peoples code. I am not sure if he is referring to the actual game subtitles or in game - user created content.
In any case, you can't just throw endless lines of code at people and expect them to know what to do with it. It's a fine balance between explaining how it works and how to implement it. On numerous occasions you have just posted links to your site and dropped support there on after. If you really want to help people go on steam with them, talk with them and correct their code when needed giving examples on how to better themselves.
Anyway, I don't feel as if I should be ranting about this, as we still haven't answered the questions. To the OP I ask for you to elaborate on your problem and be a bit more descriptive. No problem can ever be explained in the space of a thread title.
Sorry, you need to Log In to post a reply to this thread.