NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
1 2 3 4 5 … 193 Next »
More translations

 
  • 0 Vote(s) - 0 Average
More translations
calande
Offline

Junior Member

France
Posts: 24
Threads: 7
Joined: Oct 2023
#1
2025-03-24, 10:51 PM
Hello,

I think we, users, can come together and translate the platform into other languages. It's available in English and German. I'm sure some of us can take some time to contribute to translate the application(s) into other languages. I'd like to know the procedure, to have the language file and to translate each entry. I can contribute with French, I'll take my time to translate it properly. Feel free to reply with the required information to get started.

Thank you, keep up the great work

Cool
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,871
Threads: 954
Joined: May 2006
#2
2025-03-25, 01:50 AM
It is actually quite easy for me to build a file based on on Google translate the issue is finishing it off and correcting it. . However there are two translation files one for the web GUI and one for UI clients. Which one are you interested in?

Ma4in
calande
Offline

Junior Member

France
Posts: 24
Threads: 7
Joined: Oct 2023
#3
2025-03-25, 12:15 PM
I'd like to start with the web GUI first. Please tell me also where to place the language file in the file tree for the new language to show up in the drop-down menu, so that I can test it live.
Thank you.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,871
Threads: 954
Joined: May 2006
#4
2025-03-25, 12:42 PM
The web translation are in the wwwroot/languages folder of the program folder. The program folder varies by platform. Based on my experience with the UI clients is that you may find some string that aren't in the JSON file and some that are internationalized.

Note somethings can't be translated exactly. For technical reasons it doesn't apply to all languages but as an example S01E01 can't be translated to S01É01 (here in Canada they are more strict with upper case accents then your Académie).

Martin
calande
Offline

Junior Member

France
Posts: 24
Threads: 7
Joined: Oct 2023
#5
2025-03-25, 02:13 PM
Indeed...
I'm on a QNAP NAS, with an arm32v7 docker image. I would like to have the languages listed in the drop-down menu in the "General" subsection of the "Settings" page (labeled as "User Interface Language").
I browsed the file tree, and found a file called languages.json under:
Code:
\\NAS\Container\container-station-data\lib\docker\overlay2\e23a765358101ee5056b9ef0344cd473f5e01f1d5c96762269596b39d4978b27\diff\app\wwwroot\languages\

There are actually many similar folders under  \\NAS\Container\container-station-data\lib\docker\overlay2\, with similar content. I edited this file to include the existing language files that are already there, in the JSON format:

Code:
[
    "Default",
    "French",
    "German",
    "Italian",
    "Spanish"
]

I saved the file, restarted the container from Docker, refreshed the web page, but the drop-downn menu still displays only "Default" and "German".
I went ahead and opened all the similar folders and modified the languages.json file in each of these folders, restarted the container from Docker, refreshed the page but to no avail...

Still, there are language files in that directory (French.json, German.json, Italian.json, Spanish.json).
Also, the JavaScript in settings.html, on line 890 loads the languages that are listed in the languages.json file:

Code:
// load languages
            $.ajax({
                url: "languages/languages.json", success: function (result) {
                    $("#languageSelector").removeClass("d-none");

                    // check if user had any preference for the selected channel group
                    var preferredLanguage = localStorage.getItem('preferredLanguage');

                    // populate the list of channel groups, and select the users preference
                    var languageSelector = $("#selectedLanguage");
                    languageSelector.empty();

                    for (i = 0; i < result.length; i++) {
                        var language = result[i];
                        languageSelector.append("<option>" + language + "</option>");
                        if (preferredLanguage != null && language.toUpperCase() == preferredLanguage.toUpperCase()) {
                            languageSelector.prop('selectedIndex', i);
                        }
                    }




                    // handle language change
                    $('#selectedLanguage').on('change', function () {
                        // save selected channel group to a cookie
                        var preferredLanguage = $("#selectedLanguage").val();
                        localStorage.setItem('preferredLanguage', preferredLanguage);
                        // force page to retranslate
                        resetTranslations();
                        document.location.reload();
                        translatePage();
                    });
                }
            });

I suspect I didn't edit the right file, as there are many different copies of the container on my Docker file tree (I'm discovering the mess Docker does with all its version management).
Of course, when browsing the "Settings > General" page of NextPVR in the web browser, opening the Developer Tools to manually add an entry to the drop-down menu doesn't work, not even to test.
There's gotta be an easy way. I need more time to look into it...

As a side note, yes, as you mentioned, in French, "S01E01" is left as is, no accent on the letter "E" in this particular case (common practice among users, although accents are expected on uppercase characters otherwise).
calande
Offline

Junior Member

France
Posts: 24
Threads: 7
Joined: Oct 2023
#6
2025-05-21, 03:43 PM (This post was last modified: 2025-05-21, 03:45 PM by calande.)
Out of the blue, I decided to try selecting the language drop-down menu in the settings. To my great surprise, it kind of works. French, Italian and German display most of the interface in the foreign language, however, each text label is surrounded by angle brackets, for some reason... There are English leftovers here and there in the translated GUI. If you have language files that I could proofread, feel free to send them to me (for French only). I found many language files, in the file tree, with the same name here, but wasn't able to identify which one is in use by the application.


Attached Files Thumbnail(s)
       
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#7
2025-05-21, 08:58 PM
I've fixed it so these square brackets are gone for the next build.
calande
Offline

Junior Member

France
Posts: 24
Threads: 7
Joined: Oct 2023
#8
2025-05-22, 05:37 AM
Thank you! If you need help to translate the remaining items that are still in English here and there, feel free to send me the translation file.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,871
Threads: 954
Joined: May 2006
#9
2025-05-22, 04:21 PM
I wrote a quick and dirty program that extracts all the text from the html files that are with NextPVR Shown here. https://pastebin.com/0NdwWxuX The ones with brackets are existing but they are removed for the next version. It shows you how much you need to do. Are you really sure that you want to do that?

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Translations in skin.xml Old Dog 3 1,653 2006-08-19, 08:00 PM
Last Post: Old Dog
  Translations Old Dog 1 1,319 2006-03-11, 01:22 AM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode