Coder Social home page Coder Social logo

Translation of the mod-ui about mod-ui HOT 7 OPEN

moddevices avatar moddevices commented on August 19, 2024
Translation of the mod-ui

from mod-ui.

Comments (7)

odurc avatar odurc commented on August 19, 2024

Hello Átila.

Thank you for your effort to try helping but I should say we've no plans to keep translations of the installing instructions in other languages than English.

from mod-ui.

atilacamurca avatar atilacamurca commented on August 19, 2024

How about the UI itself, any plans to enable translation?

from mod-ui.

odurc avatar odurc commented on August 19, 2024

No plans as well. We probably should to use an internationalization framework/library before start doing translations. If you are interested to help, maybe you could validate or improve the text (in English) of the instructions. It would be very appreciated.

from mod-ui.

atilacamurca avatar atilacamurca commented on August 19, 2024

Great! I really miss some links and tips to help the install process.

from mod-ui.

boomshop avatar boomshop commented on August 19, 2024

It's quite easy to implement, no need for another lib. Use labels like
e.g.:

Setup language files (which can be loaded in whatever way) like e.g.:

languages/en.js


if (!dictionary)
dictionary = {}
dictionary["en"] = {
"whatever_expression" : "Whatever Expression"
}


And add a language selector in your application like e.g.:

this.default_language : "en";
this.set_language : function (lang) {
if (dictionary.hasOwnProperty(lang))
this.language = lang;
else
throw "Invalid language '" + lang + "'";
var def = this.default_language;
$("[lang]").each( function () {
var t = $(this);
var l = t.attr("lang");
t.text(dictionary[lang][l]
|| dictionary[def][l]
|| l);
});
}

Or: instead of throwing load the language asynchronously and call
this.set_language(lang) again.

To make things easy for translators:

$("[lang]").each( function () { $(this).text($(this).attr("lang")); });

Best, Markus.

Update: shall I add it to my branch these days?

from mod-ui.

atilacamurca avatar atilacamurca commented on August 19, 2024

There's a great lib for this called Jed.

Has a great documentation, it's similar to other known libraries (has _(value), support for plurals, etc).

I think it's worth to consider.

from mod-ui.

odurc avatar odurc commented on August 19, 2024

Hey Markus. Better to ask @brunogola and @falkTX they are working in the mod-ui code.

from mod-ui.

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.