GithubHelp home page GithubHelp logo

Language support about jkan HOT 8 OPEN

timwis avatar timwis commented on May 26, 2024
Language support

from jkan.

Comments (8)

keeganmcbride avatar keeganmcbride commented on May 26, 2024 1

Our portal is now available in Estonian and English both. I haven't pushed it to live yet, but the code is available here: https://github.com/okestonia/jkan Some of the fixes are a bit sketchy, but everything seems to work. okestonia/opendata.riik.ee@b0dac5e is the main commit and then there was some JS changes here as well: okestonia/opendata.riik.ee@da2f50a

Basically every page is given a unique ref and a language tag. For example:
(Estonian)
ref: blog
lang: et
(English)
ref: blog
lang: en

and then you are able to navigate through the pages with
{% assign pages=site.pages | where:"ref", page.ref | sort: 'lang' %}
{% for page in pages %} {{ page.lang }} {% endfor %}

All the Estonian pages are in root directory and then created a new folder for English pages (/en) and here we can put all the folders and files that we translate.

from jkan.

iltempe avatar iltempe commented on May 26, 2024

thanks! it is a partial translation...but i'll work on that!

from jkan.

iltempe avatar iltempe commented on May 26, 2024

I've made some investigations on that. What do you think about this method? https://www.sylvaindurand.org/making-jekyll-multilingual/

from jkan.

keeganmcbride avatar keeganmcbride commented on May 26, 2024

Our JKAN is now going in Estonian, should be fully operational and live by 1 Nov. The approach mentioned above seems feasible.

from jkan.

timwis avatar timwis commented on May 26, 2024

That's fantastic news!! The plugin-free approach is great to hear, too, so we can pull it in upstream and share it with other JKAN users.

from jkan.

timwis avatar timwis commented on May 26, 2024

That's awesome, great work!! Hoping to dive in a bit more this weekend. Perhaps we can work it in to the upstream repo?

from jkan.

keeganmcbride avatar keeganmcbride commented on May 26, 2024

It is up now: http://opendata.riik.ee, but I have to say the English section is still a bit rough. I am having issues with the individual datasets/organizations pages. I guess there are sort of two different approaches. One would be to add boilerplate to the datasets and then have two folder with duplicate copies of the datasets and then just translate the layout pased on page.lang (probably this is what has to be done in a similar fashion to other pages). The other way, and a bit less clean, would be to just have two copies of every dataset, create duplicate layouts (datasets.html and datasets_english.html) and then adjust the javascript that is creating the datasets-items to have two containers, one in English and one in Estonian. Anyways this is still a work in progress on our end and I would love to hear your thoughts.

from jkan.

keeganmcbride avatar keeganmcbride commented on May 26, 2024

We now have translation for blogs working, see working example here: https://opendata.riik.ee/en/blogi/what-impact-border-trading-local-traffic/

The files are duplicated here: https://github.com/okestonia/jkan/tree/master/_blogi
Then in config we play with the defaults (look from line 135) https://github.com/okestonia/jkan/blob/master/_config.yml

accessed on the blog layout via {% assign sortnews = site.blogi | where: "lang", page.lang | sort:"submitted" | reverse %}

from jkan.

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.