Homepage    |    GitHub    |    API    |    FAQ

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