Giter VIP home page Giter VIP logo

Comments (6)

ONElua avatar ONElua commented on July 30, 2024

a table for each language!!!

from autoplugin.

ONElua avatar ONElua commented on July 30, 2024

spanish = {MENU_TITLE="Autoplugin" ....}
english = {MENU_TITLE="Autoplugin" ....}
...

and switch
language = spanish

then only show info with con language
language[MENU_TITLE]

from autoplugin.

bamhm182 avatar bamhm182 commented on July 30, 2024

For some reason I couldn't get it to work like that. With the code:
test = {TEST="My Test", TEST2="My Test 2"}
os.message(test[TEST])
os.message(test[TEST2])

It would crash stating that they were nil when os.message expects a string. There's not really a whole lot of reason to keep all of those tables in memory IMO. When the translate page loads, however, there will be a table for each language.

EDIT: Rereading what you wrote, that makes sense and I was thinking about it wrong. I will end up doing something very similar to what you suggested. Thanks!

from autoplugin.

ONElua avatar ONElua commented on July 30, 2024

test = {TEST="My Test", TEST2="My Test 2"} <- os.message(test[1]) for My Test

from autoplugin.

ONElua avatar ONElua commented on July 30, 2024

another way
test = {

test1 = "My Test", -- important the ,

}
os.mesage(test.test1)

from autoplugin.

bamhm182 avatar bamhm182 commented on July 30, 2024

I have completed the first iteration of this feature. It currently saves the translations you have made to ux0:data/AUTOPLUGIN/.lua so they can be sent to us here and we can add them to the files or the translator can add them.

The ones with no translation are listed first, then all the rest of the translations are dumped onto the page. I'm open to feedback.

from autoplugin.

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.