Dashboard translation

Hi, my name is Javier and I am user of Pi-hole. First of all, I want to thank all the developers for this application. I tried to search something about "dashboar" and "translations" but I didn't have any result.

Years ago I developed somes front-end in php, js, sqlite and mysql but now I develop in .net for work. I need remember something about php but it isn't problem.
This will be my fist open source that I want to develop but I don't know how to start, if I need to ask someone or something else.

Is someone developing the translations for "AdminLTE"? If I download the project, can I develop? Do i need follow some rules?

Thanks you.

Hi @Etxben,

thanks for your offer. For the current AdminLTE there is no interface translation planed (but you could do it of course!) but for the new web interface (targeted for v6.0). See here

and this is the official site for translation

If you want to contribute to pihole you have to make a pull request on github

https://docs.pi-hole.net/guides/github/contributing/

@yubiuser I think you're confusing something here. This seems to be designed for the React web interface

which was originally planned to become v6.0. I think this is outdated. I recall having seen a comment somewhere that due to the lack of core developers being able to deliver a complete React framework within acceptable timescales this project seems to be postponed to some post-v6.0 (or maybe it even gets abandoned?). Pinging @DL6ER for confirmation if my conclusions are right or bullshit.

This may be what you are looking for with the current web interface: https://adminlte.io/themes/dev/AdminLTE/pages/examples/language-menu.html

They always welcome pull requests (I will do one myself, soon, first I have to get an idea and then learn PHP, however :slight_smile: )

Yeah, maybe I mixed it up. There is/was the NG webinterface, http://pi-hole.io/, and https://web.pi-hole.net.
I had the impression the later is the one where (a bit of) work is still going on:
GitHub - pi-hole/web: Pi-hole Web Interface for viewing stats and managing your Pi-hole

and it includes the ability to select languages

https://web.pi-hole.net/settings/preferences

I assumed this is the interface scheduled of v6.0 but this might be wrong.

Thank you for the responses.
This week i searched the web Crodwin for the translation but I can't find on "AdminLTE" project for use these files. Now, with the response of yubiuser, I know that is the project "web" on github.
I will try help with something.

Confirmed. The currently translated strings on the Crowdin platform were not useless, we can almost certainly use the majority - if not all - of the translation results (after all, it is an interface for the same software), however, we will have to add a ton more strings as the Crowdin platform is not complete.

And we yet have to find a good way to do this translation in PHP (and the API? Or are API responses okay in English-only?...).

Hello.

When I worked with PHP and json for develop backend I usually sended a status code and the front-end translates the message to the user. I usually did when the front-end was an mobile app.

When I developed front-end that only read data from database, it didn't launch any process or similar, the web page was translate with the function gettext and *.po files. The po files i edited with "Poedit" .

I remember that i developed easily some CRUD, but pi-hole is bigger than the projects. If you want I could make a branch with two or three pages as an example.

I recall us using POEditor in the past.

Thanks for the offer, this would be very interesting to see how much effort it would be. Mind that we also have to translate things coded in JavaScript files that will only be available at runtime (not through PHP) so it may be interesting to use a JavaScript powered translation framework that replaces text in the already built pages?
Just thinking out aloud here and not something we' have to do.

This week I have somes things to do at evening, I don't know if I could start and i need install some programs to develop with PHP because now I only have install VS 2019 and SQL Server.
First, I try with PHP, gettext and PoEdit. Also I am reading for translate with JS and i will try if i see something avaible.

1 Like

I agree that an all-in-Javascript solution might be the easiest one. Also from the coding perspective on the PHP end (you don't have to wrap all strings in gettext()). I searched a bit online but there are only very cumbersome things around.

I don't know if php and gettext is better than a javascript solution. For both solutions, i think that it needs change the code. If nobody tries we don't know what solution is better.

For a javascript solution I talked with friends, they tell me that they use "i18next" framework and there are plugins for php and jQuery. I told jQuery because AdminLTE has this framework.

I don't have any problem to try any solutions, new ideas or start another solution.