Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


multi-languages
#3
(05-12-2023, 12:15 PM)Tim Curtis Wrote: Thanks for the offer :-) but although "multi-language" is somewhere on the TODO list there hasn't been a dev to take on the substantial work effort to create and maintain a language string database and modify the code base to use it.

It would be an interesting task... In the past I have done a dynamic dictionary which could change the language without requesting the page again, but:

1. it requires the language strings to be retrieved first

2. it needs all the "translatable" elements, no matter what they are, to have an attribute with which to determine the relevant text to be assigned.

Then it was a matter of something (simplifying...) like the following

Code:
document.querySelectorAll('[dictId]').forEach((item) => {
  item.innerText = getDictionaryTextById(item.attributes['dictId']);
  }
});
Reply


Messages In This Thread
multi-languages - by Phil35 - 05-12-2023, 09:25 AM
RE: multi-languages - by Tim Curtis - 05-12-2023, 12:15 PM
RE: multi-languages - by Nutul - 05-12-2023, 01:19 PM
RE: multi-languages - by Tim Curtis - 05-12-2023, 02:44 PM
RE: multi-languages - by bitlab - 05-12-2023, 03:34 PM
RE: multi-languages - by Tim Curtis - 05-12-2023, 03:52 PM
RE: multi-languages - by Nutul - 05-12-2023, 07:35 PM
RE: multi-languages - by bitlab - 05-12-2023, 08:25 PM
RE: multi-languages - by Tim Curtis - 05-12-2023, 08:43 PM
RE: multi-languages - by reiou - 11-04-2023, 10:19 PM
RE: multi-languages - by Tim Curtis - 11-04-2023, 10:43 PM

Forum Jump: