Giter Club home page Giter Club logo

Comments (9)

Anuken avatar Anuken commented on May 4, 2024 2

Storing the text and fetching it isn't the hard part; the hard part is making it load the right text bundle for the locale, and having it fallback when necessary.
Advantages:

  • simpler format, no quotes, easy to edit
  • automatically format strings you pass in with specific arguments
  • automatically load the right bundle for the locale of the user
  • automatically fall back to the right bundles when the optimal one is not found
  • works across all platforms, including HTML5 (a lot of standard Java stuff doesn't work there, so that's a big deal)
  • probably faster to load and use than JSON, as the format is much simpler

If I use JSON, I'll have to re-implement all of these features, probably for each platform, too. The formats aren't too different; can't you do something like remove all quotes and replace : with =, using the appropriate tools in your editor?

from mindustry.

skybldev avatar skybldev commented on May 4, 2024 1

...can't we just use JSON? What are the advantages or benefits in using I18Bundle instead of JSON? I've already gone through about half of the total game text and put it in JSON, and was thinking we'd be able to import the JSON as an object in the files that the game has text in, and then reference them wherever it is needed.

from mindustry.

skybldev avatar skybldev commented on May 4, 2024

Ah, gotcha. I'll work on porting all the gametext i stored onto the JSON into I18Bundle. Starting pull request when done.

Also, one thing: on Desktop (atleast as far as i know), the text in the main menu are sprites, so we should probably make new sprites for them corresponding to the languages we translate the game into...

from mindustry.

Epowerj avatar Epowerj commented on May 4, 2024

I just want to note that there is likely an automatic JSON to l18Bundle converter out there somewhere that you could use.

from mindustry.

skybldev avatar skybldev commented on May 4, 2024

...I wish I had known that... earlier... 😒
(jk thx epower, ill try it out and see what i can find)

from mindustry.

Anuken avatar Anuken commented on May 4, 2024

If you give me the files, I can probably write a script that can convert them very quickly. The l18Bundle format is very simple.

from mindustry.

 avatar commented on May 4, 2024

I want translate Korean in this game.

from mindustry.

Anuken avatar Anuken commented on May 4, 2024

@Cloud9350 It might be best if you join the Discord server for this, as it's easier to ask questions there, and I have the instructions and files already posted.

from mindustry.

amrsoll avatar amrsoll commented on May 4, 2024

Hey guys, I see the app on the play store doesn't have a full French translation. I have made one myself. Should I add a fr-FR folder in fastlane/metadata/android/ mimicking the russian folder?

from mindustry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.