Coder Social home page Coder Social logo

Language localisation about rse-glossary HOT 5 OPEN

rseng avatar rseng commented on August 29, 2024
Language localisation

from rse-glossary.

Comments (5)

vsoch avatar vsoch commented on August 29, 2024

This is a great idea! And hey long time no see, good to see you!!

There are two ways (I can think of) to go about this -

  • use separate files for each language, at the risk of them going out of sync
  • put sections for languages below each term in the same file

The second approach is likely better so files don't get forgotten or go out of sync, although it risks having a really huge file if it gets too big. What are your thoughts? How is it done in other places? If we do choose to do separate files, there could be some check that (minimally) a term in an "other language" file is present in english. How would we keep the files / definitions in sync?

from rse-glossary.

victorsndvg avatar victorsndvg commented on August 29, 2024

Good to see you too :)

Honestly, I don't have any experience on this ...

I think the first approach is better for a growing project, but if it's not going to be so big the second approach is ok for me too.

About synchronization, I think that English can be the default language, If other language is not synchronized then the default language should be shown for a particular term of the glossary (maybe with a message telling "This term was not yet translated to $LANGUAGE, please help us by opening an issue here ...")

What do you think?

from rse-glossary.

vsoch avatar vsoch commented on August 29, 2024

I love it! And I agree, we should develop in anticipation of growing size.

If you want to add a file to _data, perhaps terms_<language>.yml and start with a copy paste of the file (and then writing the definitions) I can then work on the interface to make it easy to toggle between.

from rse-glossary.

victorsndvg avatar victorsndvg commented on August 29, 2024

Ok, perfect.

I will contribute soon with spanish (es-ES) and galician (gl).

We can use codes from http://www.lingoes.net/en/translator/langcode.htm to identify each language, e.g. terms_es-ES.yml. Do you agree?

from rse-glossary.

vsoch avatar vsoch commented on August 29, 2024

Yes, and let's add a link to that in the README under some section for "How to add a Language"

from rse-glossary.

Related Issues (3)

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.