Translating the game

  • #1, by ke4Sunday, 30. August 2015, 15:16 10 years ago
    Hi,
    i have two languages ( Czech, English ) But Czech audio/texts and English texts only, it may change but not anytime soon. It's supposed to be Czech audio and English texts in the English version. Please can you help me with the following questions? Many thanks.

    1. Can i set languages separately for texts and audio? Or do i have to enter Czech audio files into English boxes?

    2.When i open the texts tab, there are all texts. For every text two boxes for translation, but both in Czech, do i have to set manually for every translated box English language?

    3. I downloaded Poedit ( nice&free translation software ) Can i somehow export texts ordered by the date of creation, or by Scenes? It seems to be exported randomly. When i translate the texts and import them back, it overwrites the languages i have in the engine? I really don't want ruin the whole texts.

    4. I can actually import speech files and they will be automatically assigned to texts, all i need to do is put the text ID into the audio file name? Underscore is fine?

    Key Killer

    810 Posts


  • #2, by afrlmeSunday, 30. August 2015, 18:07 10 years ago
    Hmm sorry not going to answer all of your questions in detail.

    When you create your display texts you can set the text (subtitles) for the various available languages by clicking on the flag (country) icon & selecting the language you want to write the text for.

    Alternatively you can export the texts & back in at a later date using the export & import text options. I don't know about po editor thing. I believe I exported them in csv format & opened them up in open office or something - I forget which program I opened them up in off the top of my head.

    If you are only providing one speech track then you only need to add the speech file to the primary language audio bit in each display text as it's possible via Lua script (since 4.x) to change the speech & text languages independently from one another.
    game.StandardLanguage = Languages["English"]  -- define text language
    game.SpeechLanguage = Languages["Czech"] -- define speech language
    

    Imperator

    7285 Posts

  • #3, by ke4Sunday, 30. August 2015, 18:24 10 years ago
    Great that the language can be set independently. Very nice.

    I know that i can click on the flag and choose the country, but i don't wanto click a thousand times and change the language for the translation. I don't know how that works. I'll make a backup and i'll just test it out.

    one thing off-topic. How can adjust this for absolute positioning? Can get it work.

    Thank you.

    Objects["name"]:to(500, { ObjectOffset = {x = 50, y = 50} }, easeQuintOut)
    

    Key Killer

    810 Posts

  • #4, by afrlmeMonday, 31. August 2015, 01:29 10 years ago
    Offset is what it says: offset. If you want absolute positioning then use the action part (there was an alternative action part included in 4.1 for moving objects to absolute position instead of the action part that was included in 4.0 which offset the objects from initial position).

    Personally I recommend creating the images as a single animation frame in an infinite loop for all objects you want to move around the screen as it's far simpler to move animations than the entire object, seeing as the object move / offset action parts also adjust the object center & position of the object area polygon too.

    ActiveAnimations["name"]:to(500, { AnimationCurrentPosition = {x = 50, y = 50} }, easeQuintOut)
    

    Imperator

    7285 Posts

  • #5, by ke4Monday, 31. August 2015, 11:02 10 years ago
    The thing is that i need to move it from Lua and the action script doesn't allow specify the position from values.
    If i can't set the object position, can i set position of the object's action area instead? Tried with VObjectPolygon, but it always returns nil, i guess that object's polygon isn't object's action area then?

    Key Killer

    810 Posts

  • #6, by afrlmeMonday, 31. August 2015, 12:12 10 years ago
    The object polygon won't update without refreshing the scene. The only current method are the two move object action parts & the Lua method (which currently only allows you to specify the offset).

    An alternative method would be to duplicate the object, drag it & then object polygons to where you need them. Create a condition to toggle which should be shown, then you could use the move animation tween example I showed above to slide the image to position & then immediately after animation reaches the position you would change the condition to hide the current object & to show the new object.

    The method above is only valid of course as long it's not imperative that you need the object polygon to move with the object, for say: a shooting gallery mini-game or something.

    Imperator

    7285 Posts

  • #7, by ke4Monday, 31. August 2015, 12:26 10 years ago
    I need the polygon. I'm trying to create a dragging function. It works all great, this is the only problem there.
    Okay, guess it's a way, but it means a hundreds of duplicated objetcs.
    What about reload the current scene with immediate option?

    &Thanks!

    Key Killer

    810 Posts

  • #8, by afrlmeMonday, 31. August 2015, 12:45 10 years ago
    Could you please explain to me in more detail what you mean by a dragging function?

    Imperator

    7285 Posts

  • #9, by ke4Monday, 31. August 2015, 12:57 10 years ago
    Okay, i'm currently making the menu, this is a volume slider.

    There is eventHandler which on buttonDown register new eventHandler
    and on buttonUP unregisters this new eventHandler

    What the new EventHandler does is on mouseMove
    store the X position of cursor and set the animation position(object - pointer ) to the X positon and the Y stays the same.

    basically it is while left button is hold move with the animation
    then i store the X position and write it into the config. It's 400px wide so X/4.

    Key Killer

    810 Posts

  • #10, by afrlmeMonday, 31. August 2015, 13:17 10 years ago
    The event handler you are creating & unregistering is a mouseEvent handler? Only multiple instances of mainLoop events are allowed to be created. The mainLoop events are also the only events that are currently allowed to be unregistered.

    Technically you don't need an object area to move the slider thing. I believe it would be possible to check if cursor is inside of a specified radius or rect area based on the current position of the animation image. The math is a little complicated though.

    P.S: you do know that there are multiple examples of a volume slider floating around the forum & wiki already yes?

    Imperator

    7285 Posts

  • #11, by ke4Monday, 31. August 2015, 13:27 10 years ago
    Yes it's mouseEvent and already third one in my game. Why there cant be multiple mouseEvent handerls? :/ All works fine...

    Nice idea with the rect idea, should definitely work with that.

    I know i was searching through the forum and i found your example .ved file but it wasnt drag and drop slider, but with buttons on the side. It's from 2012 so i guess there wasn't functions for that then.
    Then i found something on Wiki article fom the forum search, but it was really long script and that little scared me i want something simple. My version is just a few lines of code.
    I did't check the wiki though.

    Good articles btw, but how they can be found except random search?

    Key Killer

    810 Posts