chesslablab / website

A free, open-source web app to learn and play chess online. Created with PHP and JavaScript, using Symfony and Bootstrap.
https://chesslablab.github.io/website/
MIT License
23 stars 27 forks source link

Multilanguage #123

Closed d47081 closed 6 months ago

d47081 commented 7 months ago

Hi there!

Good work, already have updated to this implementation!

So what about multi-language interface? As client based on Symfony, I can advice Crowdin adaptor, here is documentation: https://symfony.com/doc/current/translation.html https://store.crowdin.com/symfony

Also, here is small wiki tutorial for another project could help you with API: https://github.com/YGGverse/YGGtracker/wiki/Translations

I'm ready to participate Ukrainian translations! Also released few local announces about Chesslablab project

programarivm commented 7 months ago

It seems as if this issue can be elaborated in more detail.

What about implementing a basic setup using the symfony/translation component as per the docs at Translations?

Something like the following will be a good starting point.

use Symfony\Contracts\Translation\TranslatorInterface;

public function index(TranslatorInterface $translator): Response
{
    $translated = $translator->trans('Enter Invite Code');

    // ...
}

Keep it up,

d47081 commented 7 months ago

Yes, I mean web interface for users without programming experience and you can sync those results just by few commands.

I'm using translation strings in twig templates as filters (mostly)

The original keys - is English text, so no needs to have additional work, just cover every new string into the helper method: https://github.com/kvazar-network/webapp/blob/master/templates/default/layout.html.twig - simple example

In Symfony it's super simple to setup, and with Crowdin - everything would be auto-translated with AI suggestions or the real users.

Just take a look at this feature!

programarivm commented 6 months ago

See https://github.com/chesslablab/website/issues/190