Lilith Posted March 21, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Share Posted March 21, 2013 I propose to add multilingual support. Player's language stored in the database (sd-> lang_id, for ex.), default 0 - English language. The idea is to read multiple files msg_conf different languages. sd->lang_id = 0 // English sd->lang_id = 1 // Spanish sd->lang_id = 2 // German etc... msg_table[MAX_LANG][MAP_MAX_MSG]; For add the new language we must add a new parameter like 'read_msg: 1,map_msg_sp.conf', where '1' - is Language ID 'map_msg_sp.conf' - spanish translation. In-game example: if player havent language (sd->lang_id = 0), he will recive 'Character not found' if(sd->lang_id = 1) // Spanish he will recive 'El carácter no se ha encontrado'. Thus, each player will receive messages from the server in understandable language. 8 Link to comment Share on other sites More sharing options...
Euphy Posted March 21, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 21, 2013 This project's roles: Coding: @Lilith & @Lighta Translations: Chinese: /@goddameit German: @Snow/@Lemongrass Russian: @Lilith Bahasa Malaysia: @Feistz Bahasa Indonesia: @Cydh/@nanakiwurtz French: @Capuche Spanish: @jaBote/@Tragedy Portuguese: @mkbu95 A huge thanks to everyone for your willingness to get involved! 1 Link to comment Share on other sites More sharing options...
Cydh Posted March 21, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 21, 2013 nice translation idea for msg_conf. Link to comment Share on other sites More sharing options...
DarkArcAngel Posted March 22, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 1 Reputation: 1 Joined: 06/07/12 Last Seen: March 8, 2017 Share Posted March 22, 2013 (edited) very good idea, the brazilian project has a similar system. http://svn.brathena.org/brAthena/testes/conf/lang/ Edited March 22, 2013 by DarkArcAngel 1 Link to comment Share on other sites More sharing options...
Emistry Posted March 22, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 22, 2013 just a translation of all system messages ? or something that look like the eAmod language system ? isnt that would be very large to store all messages in database ? why not just create another option to read different message conf file ? beside....if i am not mistaken, this will also required the client to have a proper langtype to support some of the languages..and of course not all language is supported i believe. Link to comment Share on other sites More sharing options...
Lilith Posted March 22, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Author Share Posted March 22, 2013 @Emistry, server's messages only ( \conf\msg_conf ) Link to comment Share on other sites More sharing options...
Flaid Posted March 23, 2013 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 398 Reputation: 140 Joined: 01/04/12 Last Seen: February 19, 2022 Share Posted March 23, 2013 Seems like a good idea, you got my support. Link to comment Share on other sites More sharing options...
Bipolar Bear Posted March 23, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 12 Reputation: 1 Joined: 03/22/13 Last Seen: July 18, 2013 Share Posted March 23, 2013 I'm supporting this. Link to comment Share on other sites More sharing options...
kiros Posted March 24, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 60 Reputation: 9 Joined: 04/16/12 Last Seen: December 5, 2019 Share Posted March 24, 2013 +1 Link to comment Share on other sites More sharing options...
Euphy Posted March 24, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 24, 2013 This is a fantastic and very reasonable way for rAthena to encompass a larger community. It certainly gets my vote. If no developer disagrees, we can begin work on this immediately. Lilith: Are you able to code the implementation of this, and contribute a Russian translation? To everyone else: If you have the time, please post or let me know if you're willing to write a translation for your native language. We will need, at minimum, one file for each language in our International Forums. very good idea, the brazilian project has a similar system. http://svn.brathena.org/brAthena/testes/conf/lang/ That's also an interesting idea; it's not as immediately useful, but worth considering. Let's return to it after msg_conf is finished or under way. 3 Link to comment Share on other sites More sharing options...
Cydh Posted March 24, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 24, 2013 To everyone else: If you have the time, please post or let me know if you're willing to write a translation for your native language. We will need, at minimum, one file for each language in our International Forums.+1 and I hope Indonesian will have own msg_conf, Indonesian and Malay have different speech. Link to comment Share on other sites More sharing options...
Lilith Posted March 24, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Author Share Posted March 24, 2013 (edited) Initial support to read multiple 'msg_conf' files... Need tests. Change 'lang' column in table 'login' for change language id... By default, lang ID = 0 its English Examples: (in char_athena.conf, login_athena_conf and map_athena_conf ) Translations Format: read_msg: language ID,path read_msg: 1,conf/msg_conf/map_msg_sp.conf // Spanish read_msg: 2,conf/msg_conf/map_msg_ru.conf // Russian Diff: http://www.mediafire.com/?uita4m3p4e9uovu SQL Query: ALTER TABLE `login` ADD `lang` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0' Edited March 26, 2013 by Lilith 2 Link to comment Share on other sites More sharing options...
Cydh Posted March 24, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 24, 2013 Wow nice. changed all msg_txt line on whole src. You're careful to change them xD btw, any simplier way?1st, define msg dir, conf/msg_conf 2nd, define each msg file char_msg.conf login_msg.conf map_msg.conf 3nd, define language directory English: (lang_id 0) Russian: ru/ (lang_id 1) Spanish: sp/ (lang_id 2) so, the dir structure conf/msg_conf/char_msg.confconf/msg_conf/login_msg.confconf/msg_conf/map_msg.confconf/msg_conf/ru/char_msg.confconf/msg_conf/ru/login_msg.confconf/msg_conf/ru/map_msg.confconf/msg_conf/sp/char_msg.confconf/msg_conf/sp/login_msg.confconf/msg_conf/sp/map_msg.conf 4th, so when msg_txt is called, it checks player's lang_id, lang_id can be set by @lang maybe, and the default is 0 possible? Link to comment Share on other sites More sharing options...
Lilith Posted March 24, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Author Share Posted March 24, 2013 (edited) 3nd, define language directory English: (lang_id 0) Russian: ru/ (lang_id 1) Spanish: sp/ (lang_id 2) Do you mean that lang_id to be hardcoded in src ? No problem 4th, of course its possible. btw, i'm not sure about this implementation. For example in the file int_auction.c there is no check on the language... Edited March 24, 2013 by Lilith Link to comment Share on other sites More sharing options...
Cydh Posted March 24, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 24, 2013 not sure too.. haha Link to comment Share on other sites More sharing options...
Euphy Posted March 24, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 24, 2013 Thanks for the hard work, Lilith.Is it possible to instead modify the msg_txt function itself to check for player lang, using the default if nothing is found/no player is attached?As for structure, here's what I think: Store language files in subdirectories, as Cydh posted, to avoid clutter: conf/msg_conf/ - English files (root) conf/msg_conf/[lang]/ - Translations (subdirectories) Define lang directory names in src. Define default directory either in conf (once, in inter_athena or a new file?) or src. 1 Link to comment Share on other sites More sharing options...
Lighta Posted March 24, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share Posted March 24, 2013 Hoi, nice idea I had the same actually but never finish it, anyway here my input/ remark on this : - not official blabla, so I was thinking of just a mod but I'm agreeing with Euphy stating it's a good plus so we might put in in svn. (ok but then I think we need #define to not increase ram consumtion for people who's interested in 1 lang only. (each lang take 1 more msg_conf comsumtion, not that big but there no reason to increase it if you wont use it especially when is not that hard to prevent it...) - we was thinking of #define LANG (bitmask) so you can choose wich lang to choose. - if msg from user lang not define return default lang msg. (fallback) That general concept now to speak more about diff :-I don't like new structure of msg_txt(lang,int), I think lang could be taken in msg_txt() fonction without being assign as argument. -store data is duplicated, I mean on each serv you have assigned a var to config wich lang you want. (duplication => posssible mistmatch => possible failure), I personnaly hate duplication for this. I was thinking mmo_status could do it fine. mmo is char wide yeah but since we have one at the time I think it's ok, we wont lose ram. - New row in login is good but that could be stored as global_reg as well. Global_reg table offert the possibility of scripts/atcommand interaction while login table shouldn't if we want to respect schema/server independancy. Plus present to not need a whole new colum for that.That all anyway thx Lilith, didn't have time to properly try it yet but I'll. 3 Link to comment Share on other sites More sharing options...
Bin4ry Posted March 25, 2013 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted March 25, 2013 I can contribute in chinese translation in case if rA needs anyone. 1 Link to comment Share on other sites More sharing options...
Euphy Posted March 25, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 25, 2013 I can contribute in chinese translation in case if rA needs anyone.That would be wonderful. Thank you for your support! Link to comment Share on other sites More sharing options...
Snow Posted March 25, 2013 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 141 Reputation: 34 Joined: 05/30/12 Last Seen: August 2, 2020 Share Posted March 25, 2013 if nobody already doin it, i would support the german one o/ 1 Link to comment Share on other sites More sharing options...
Euphy Posted March 25, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 25, 2013 if nobody already doin it, i would support the german one o/It's yours. Thanks! Link to comment Share on other sites More sharing options...
Cydh Posted March 26, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted March 26, 2013 (edited) @Lilith, I saw your post has been edited, what's change? @topic btw, if the lang is decided by player in-game (with command @lang <lang_id> maybe), then it will stored on `login` table, `lang` field. is the login_msg still can be translated? example "Rejected from server", the player doesn't login at all, can't read sd->lang. (CMIIW) LOL, can I participate too for Bahasa if Indonesian Moderator doesn't do it? xD Edited March 26, 2013 by Cydh 1 Link to comment Share on other sites More sharing options...
Lilith Posted March 26, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Author Share Posted March 26, 2013 @Cydh So far, no change. I don't know how to not add an argument to a function msg_txt. I'll see today how to do this. Need to remake this all, because login server use msg_txt only for logs, not for players, my mistake... We must to add language support for map server only ( + char server's mail messages? ) I can give the russian translation of file map_msg.txt 1 Link to comment Share on other sites More sharing options...
Lighta Posted March 26, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share Posted March 26, 2013 hmm I just check how to not add an arg, we could do it by define but that may be too weak/tricky. So ye we probably need one, but I was thinking of sending sd or char_id or mmo and do the langage treatement in the msg_txt function rather then for each line. like const char* _msg_txt(struct mmo_charstatus *mmc,int msg_number,int size, char *** msg_table) { char output[128] = "??"; uint8 lang = mmc->lang; if (msg_number >= 0 && msg_number < size){ if(msg_table[lang][msg_number] != NULL && msg_table[lang][msg_number][0] != '\0') output[128] = msg_table[lang][msg_number]; else if(msg_table[0][msg_number] != NULL && msg_table[0][msg_number][0] != '\0') //fallback output[128] = msg_table[0][msg_number]; } return output[128]; } point was doing the langage treatement in the msg_txt function rather then at each call.Yes for login that may be annoying, well we don't necessarly need multiple table for login, probably the default would suffice. 1 Link to comment Share on other sites More sharing options...
Feistz Posted March 26, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 139 Reputation: 10 Joined: 11/10/11 Last Seen: April 12 Share Posted March 26, 2013 I will do the Malaysian/Bahasa Malaysia 1 Link to comment Share on other sites More sharing options...
Recommended Posts