Homepage    |    Wiki    |    GitHub    |    Twitter

Joplinapp.org with internationalization

Redirect the user in their language likes, prefers, knows.

Example of a possible implementation with url

I assume that the above post is a suggestion to implement this. Still trying to work out what the purpose was of posting a long list of hyperlinks to non-existent pages...

3 Likes

I assume that the above post is a suggestion to implement this.

  • Yes, is a suggestion to implement this.

Still trying to work out what the purpose was of posting a long list of hyperlinks to non-existent pages...

  • Yes, is a suggestion to implement this.

Hope to help, I'm creating a library where you guys can have access to multiple languages ​​\ languages. I created this repository.

please access this new link I'm making important updates GitHub - xaholo3700/joplin.website: Joplin with models|plugins and locate

Thank you for looking into this, but the website is just plain html built from Markdown, so I'm not sure we can use your library?

1 Like

I will make an api in json for you to consult the language, my idea.

example in pug

 a.fw500(href='/help/') stringHelp
              a.fw500(href='/plugins/') stringPlugins
              a.fw500(href='/models/') stringModels
              a.fw500(href='/templates/') stringTemplates

example pug+express

app.get('/en-US', function (req, res) { 
  res.render('index', { stringPlugins: 'Plugins', stringHelp: 'Help', stringModels: 'Models', stringTemplates: 'Templates'})
})

another example

 a.fw500(href='/help/') stringHelp
              a.fw500(href='/plugins/') stringPlugins
              a.fw500(href='/models/') stringModels
              a.fw500(href='/templates/') stringTemplates

example pug+express

app.get('/pt-BR', function (req, res) { 
  res.render('index', { stringPlugins: 'Plugins', stringHelp: 'Ajuda', stringModels: 'Modelos', stringTemplates: 'Templates'})
})

api query sample

  • joplin.website.repl.it/pt-BR return { stringPlugins: 'Plugins', stringHelp: 'Ajuda', stringModels: 'Modelos', stringTemplates: 'Templates' }

so,
html built from Markdown | html -> pug -> expressjs -> locate ( pt-BR/en-US ... )

fullcase

// api ip locate jquery
$.get("http://ipinfo.io", function (response) {
   window.location.href = "joplin.website.repl.it/en-"+response.country; // en-US
}, "jsonp");

reference

I didn't know the site was generated by markdown, it's easier than you think. A viable alternative is for you to translate to multiple languages the markdown.

example

  • pt-BR = pt-BR.md
  • en-US = en-US.md
  • README.md ( pt-br.md / en-US.md)
-- links readme with locate(pt-BR, en-US)

[pt-BR](locate/pt-br.md)
[en-US](locate/en-US.md)

As I didn't know that the site was not generated by markdown, I thought about the possibility of translating the elements in html to several languages ​​using pug via express.

example

references

I hope to contribute with community Joplin. I apologize to the community if I have done something wrong. I'm excited, with lots of ideas to improve Joplin

There are two ways that I see that can be applied, they are efficient and don't require a lot of work

  1. Translate the entire markdown site into other languages
  2. Transform the site into pug-js files (this method I used)

I made some corrections to the text to clarify how the site's internationalization process is

### About
This is an unofficial version of the Joplin app website made with Pug-js, Express-js to support multiple languages, includes a list of plugins, themes and templates as well.

### Reason
This repository aims to provide Joplin with internationalization. That is, people accessed the page in their native language which facilitates the adoption of Joplin app in more places.

### Important warning
The translations were done with Google Translate, the best would be to gather a set of people to correctly translate the parts (string) of the site. For this to be done in the true way, we must use a service for this. The most common is Transifex or Crowdin. These two tools like Pug-js and Express-js are some tools that allow us to reuse html type elements on the website and also enable us to offer multiple language support for the website.

Pug-js is a template engine that can render html. Express-js is a middleware responsible for creating API - Application Programing Interface.
The solution has been tested and designed on leading application hosting services and recent software at no cost (I used the free plan for this) such as Vercel, Heroku, Repl-it and Netlify, to demonstrate that it works, is secure and reliable.

...

link: GitHub - xaholo3700/joplin.website: This is an unofficial version of the joplin app website made with pugjs, express-js to support multiple languages, includes a list of plugins, themes and templates as well

process/route/locate

app.get('/en-US', function (req, res) { 
  res.render('index', { message: 'en-US', slide1: 'test' ... }) // json strings html from site
})

redirect user to locate

// api ip locate jquery
$.get("http://ipinfo.io", function (response) {
   window.location.href = "joplin.website.repl.it/en-"+response.country; // en-US
}, "jsonp");
  • change joplin.website.repl.it/en- to localhost/en if you run localhost
// api ip locate jquery
$.get("http://ipinfo.io", function (response) {
   window.location.href = "localhost/en-"+response.country; // en-US
}, "jsonp");

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.