humhub / app

22 stars 8 forks source link

Language localisation #22

Closed luke- closed 8 months ago

PrimozRatej commented 8 months ago

Hey @luke-,

I've implemented the functionality. Currently, the app supports English, Spanish, and German languages. The language switcher works in default mode, so if the user has the locale set to any of the supported locales, the app will be displayed in that language. If the user overrides it within the app (e.g., having the device in German but wanting the app to show in English), the app will remember it and open in that language next time.

Currently, the Component locale switcher looks similar to the one on the official HumHub website. I haven't implemented hover-on animations, as I didn't see it necessary for the app.

The localization files are inside the app/lib/l18n directory. For the German and Spanish translations, I basically just used Google Translate, so it might be a good idea for someone with knowledge of those languages to review them as well.

luke- commented 8 months ago

@PrimozRatej Cool. thanks!

Can you please add French as a language instead of Spanish. We don't currently have anyone from Spain on the team.

Can you please also attach a screenshot of the picker in the issue. Then Lea can have a look at it.

PrimozRatej commented 8 months ago

Hey @luke- , @Eladnarlea I added French and removed Spanish.

https://github.com/humhub/app/assets/10835179/2ce9b483-4754-4c96-ac26-fd6fe4040596

luke- commented 8 months ago

@PrimozRatej Thank you! Looks good. I'm not sure if we need the language switcher in the long run, as we can just use the system language here like most apps. But it's great for the start and for testing the languages.

Eladnarlea commented 8 months ago

@PrimozRatej looking good! is it only possible to trigger the switcher on the "arrow pointing down" or does the whole section function like a button?

PrimozRatej commented 8 months ago

Hey @Eladnarlea hitbox is over the whole dropdown component.

Screenshot 2024-03-15 at 07 26 21
Eladnarlea commented 8 months ago

@PrimozRatej great, thx!