Forum rules - please read before posting.

Problem with Hournal translations

Hi,

I have a little problem with journal translations.

I have two languages, and both are vissible when I click on my journals in Speech submenu in AC Game Editor. So it seems, that game engine is aware, that specific journal has specific translation.

However, when I run the game, change the language, I won't see journal translation at all. I see other text translated, but not journals.

Does someone have such problems as me ? Maybe some sollution for that is available ?

Currently I'm debugging AC to see how translation works.

Comments

  • I find out, that in case of journal, translation method always has 0 as languageNumber. Morover, when, in that method, I call Option.getLanguage() I will always get 0, even If in Options there is 1 set.
    Strange.

    Her is the code from JournalMenu.cs








        private string TranslatePage (JournalPage page, int languageNumber)

            {

                if (languageNumber > 0)

                {

                    return (KickStarter.runtimeLanguages.GetTranslation (page.text, page.lineID, languageNumber));

                }

                return page.text;

            }




  • Actually I managed to debug it better. It seems, that in code above, when translation is required for Journal, to (KickStarter.runtimeLanguages.GetTranslation() goes this:
    text - proper journal text
    lineId - -1
    languageNUmber - 1

    So because of lineId equal -1 I always get original translation.
    Now  I'm trying to find out, why it is always lineId equal -1 for all my journals
  • edited May 2016
    OK, I solve It. There is a bug (I belive because of copy paste made by author of AC ;-) )

    Instead of this:








            public JournalPage (JournalPage journalPage)

            {

                lineID = -1;

                text = journalPage.text;

            }


    It should be that:









            public JournalPage (JournalPage journalPage)

            {

                
    lineID = journalPage.lineID;

                text = journalPage.text;

            }

    Now it works perfect.





  • edited May 2016
    The -1 is intentional, because the code is also used when the element is copied within the menu manager.  A proper fix will be issued in v1.51g.
  • This mean i cannot use my sollution ? But it works ;-)
  • You can use it in the meantime, so long as you don't copy the Menu or Journal element in the Menu Manager.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.