Comments (4)
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.
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.
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.
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)
- fa fa-icon HOT 3
- Detective module does not work HOT 1
- footer page HOT 1
- Ideas to add HOT 2
- multi accounts HOT 2
- Class file name changes HOT 1
- Impossible to edit existing location HOT 1
- Minor error HOT 1
- Error after install regarding nbbc.php HOT 2
- Error with Handlebars in usePoints HOT 1
- Install Server HOT 3
- Changes take long to update HOT 1
- Fatal error: Uncaught Error: Class 'Round' not found HOT 1
- Gangs few issues
- Lenguajes
- can you play on chromebook? HOT 1
- Error on install
- How to make crime chance 100%? HOT 1
- Require entering an email when registering the admin account during install
- Several errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gangster-legends-v2.