Coder Social home page Coder Social logo

Comments (4)

ChristopherDay avatar ChristopherDay commented on July 19, 2024

This is planned, I have yet to find an easy to implement solution to this. I need to find the time to go back and convert any strings to translation files.

from gangster-legends-v2.

uaktags avatar uaktags commented on July 19, 2024

Started working on i18n support, chose to go without the composer package as a number of things had to be changed.
If you like it, d340877 starts to show that we can have languages in a few places: ./locale/{LANGUAGE}/translation.json is for the base install.
Then ./modules/installed/<module>/locale/{LANGUAGE}/translation.json is for each module to provide a translation.json set.
Right now I don't have anyway to block or deal with overloads, but by design in this Proof of Concept, each module would just create a new key within

{
"modules":{
   "module_name_1": { "term": "This is a term for module_name_1"}
  }
}

so each module would just append to the "modules" key and shouldn't ever affect each other. If you like this, i'll continue down this path, create a PR and push it out.

from gangster-legends-v2.

uaktags avatar uaktags commented on July 19, 2024

module.json needs to be abandoned for textual things like menus if you want language files. Currently looking into a workaround solution.

from gangster-legends-v2.

uaktags avatar uaktags commented on July 19, 2024

Think I solved this by following the idea laid out in loggedin.hooks.php, if the modules use hooks to provide the "info" array, then we can use PHP functions against the text and get back to supporting multiple languages.

from gangster-legends-v2.

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.