Python Code | Life hack for translating dialogues

Results 1 to 2 of 2
  1. #1

    note Python Code | Life hack for translating dialogues

    Русский
    Просто переводите весь документ на ваш язык , а плохой переведенный участок заменить на оригинал , чтобы не сломать скрипты. Это конечно страшно , но лучше чем ебаться недели две
    English
    Just translate the entire document into your language, and replace the bad translated section with the original so as not to break the scripts.
    It's scary, of course, but it's better than fucking for two weeks.
    Code:
    #replace your translate # нпс to npc
    # #бр to #br
    if __name__ == '__main__':
        with open('T_Dialogue.ini', 'r') as f:
            old_data = f.read()
    
        new_data = old_data.replace('нпс', 'npc')
    
        with open('T_Dialogue.ini', 'w') as f:
            f.write(new_data)


  2. #2
    Member doogydog is offline
    MemberRank
    Nov 2018 Join Date
    59Posts

    Re: Python Code | Life hack for translating dialogues

    how to?



Advertisement