adminforth icon indicating copy to clipboard operation
adminforth copied to clipboard

Error with i18n for pt-br

Open rytakei1 opened this issue 5 months ago • 3 comments

Hey, I'm trying to use adminforth for the first time, and I'll need to have a pt-br version of the admin panel. However, it seems like pt-br was not a language option in the i18n plugin, the only one I found was br. Looking at the flag that shows up, it seems to be the correct one, however, the language name is incorrect - both in the menu and in the login screen:

Image

I'd expect to see either Português (BR) or Portuguese (BR).

One more question related to internationalization, is there a way to set a default language, or deactivate english?

rytakei1 avatar Sep 14 '25 01:09 rytakei1

Hey @rytakei1 thanks a lot for your issue. Originally we made an i18n plugin in a way so it supports only ISO-639-1 codes as input, so pt is probably closest one to you right now. br is code of Breton_language , not related to Brazil.

What you mention is probably BCP 47 (IETF language tag) which is pt-BR actually - second part is ISO 3166-1 alpha-2 means it is country code of Brazil. So what we need is support BCP 47 also in addition to pure ISO-639-1, which @yaroslav8765 will do soon.

is there a way to set a default language, or deactivate English?

Not yet, but we will add it if you need it!! Please wait for updates

ivictbor avatar Sep 15 '25 19:09 ivictbor

Hi @rytakei1, Support for BCP 47 tags (like pt-BR) has been added. You can now set pt-BR as the primary language. See the docs for examples: https://adminforth.dev/docs/tutorial/Plugins/i18n/ Thank you for your issue!

SerVitasik avatar Sep 18 '25 08:09 SerVitasik

@rytakei1 can you please update plugin to new version and share your feedback with us, feel free to ask any questions or ask any additional features

ivictbor avatar Sep 19 '25 08:09 ivictbor