mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-19 16:30:26 +00:00
add support for auto language. Not perfect, it picks a language not supported sometimes
This commit is contained in:
parent
9bf3eabb6e
commit
55d3c32b40
3 changed files with 13 additions and 3 deletions
|
@ -299,6 +299,7 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
if (this.status >= 200 && this.status < 400) {
|
||||
// Success!
|
||||
self.langs = JSON.parse(this.response);
|
||||
self.langs.push({ name: 'Auto (experimental)', code: 'auto' })
|
||||
if (self.langs.length === 0){
|
||||
self.loading = false;
|
||||
self.error = "No languages available. Did you install the models correctly?"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue