Sign in

Where do I change the language of the app?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2597
    rmego

    Hello, I’m really enjoying the app, but I couldn’t find an option to change the interface language.

    How do I do this?

    Thank you.

    #2599
    Verhoeckx

    Hello Rmego,

    You can’t change the interface language of the app Publii.

    They had it on their roadmap but they removed it because it would introduce a lot of all kind of usability bugs. For example: long translations of particular words, etc.

    So English it is :-)!

    Verhoeckx

    #2600
    rmego

    Oh, it’s a pity, but thanks for chime in @Verhoeckx.

    Now my mom will have to call me everytime she needs to publish a new post in her blog… 🙂

    But, seriously, the only way to use the app in another language is by translating it directly in the source code and building a custom app? Well, it looks a little involved… I think I could do that.

    But, if I do this, can I share this custom version of the Publii app with other people? Not just my mom, of course 😉

    #2601
    Verhoeckx

    Now my mom will have to call me everytime she needs to publish a new post in her blog… 🙂

    A good reason to stay in contact with her during the corona crisis ;-)!

    I guess you can translate the app by editing the source code and building a custom app but is it that really worth? It’s not really a ‘scalable solution‘. In other words: then we have two apps instead of one.

    @Tomasz Dziuda: what do you think would be the best solution? (I hope he reads this)?

     

    #2602
    rmego

    Yea, you are right @Verhoeckx, I would gladly refrain from creating a custom app just for that.

    But now I would have to manage other blogs for my folks that doesn’t read in English.

    And, from my past record doing this, I honestly think it’s going to take me even more work than creating a custom app! Geez… you get the picture.

    #2606
    rmego

    Well, after some Powershell fun last night I managed to create a custom translated Publii app (v. 0.36) on my Windows 10 machine!

    It was not that difficult (for me), altough it was quite labor intensive.

    Here’s some tips and gotchas for other people who may wish to do that (for fun or out of necessity):

    1) Make sure you’re on a Windows 64 bit machine. I tried to build the app on an older PC I had here and the app just wouldn’t build.

    2) Download the app’s source code from Github and unzip it. You can translate the app texts inside the app/src/components folder. To do that, open each .vue file in a code editor (not with Word of something like that), edit the texts as you see fit and save the files. For this task, I recommend VSCode editor (from Microsoft, completely free), Notepad++ or something similar.

    3) If your language has accent marks, you will need to encode the special characters inside the texts (e.g: the word “publicación”, becomes “publicación”). For some reason words with accent marks appear garbled on the final app without this encoding. To do that encoding in VSCode, install a free extension called “HTML accented character converter”. It applies this automatically on the whole file.

    4) After translating the files, follow the instructions to build the app from the Publii’s wiki. Obviously, you will need familiarity with the Windows command line to do all this. This may be off putting for some people, but I learned a lot during the process. It was quite fun! I used the standard Powershell app to do that.

    5) With the Powershell window opened you will issue commands to install the packages necessary to build the app, mainly using the Node.js (e.g: npm install electron@8.2.0 -g). It’s important to install the exact versions of the software as they recommend. To install a specific version of Node.js, install first the NVM (Node Version Manager) for Windows, so you can choose the exact version of Node.js they recommend (I used Node version 10.20.1).

    6) I had an issue with the block editor module during the build process. After fiddling a little bit, I discovered that you need to manually donwload the Block Editor’s source code from Github, unzip it and put it inside the main Publii souce code folder, changing it’s path in the package.json file inside the /app folder, like that:

    # Find:
    "publii-block-editor": "github:dziudek/publii-block-editor#master",
    
    # Replace:
    "publii-block-editor": "../publii-block-editor-master",
    
    

    7) Also, the command npm run prepare-editor didn’t work for me (it looks that it’s just for Unix systems), so I had to copy the directories as stated in their tutorial.

    8) After that, the app building process went well and I was able to generate the custom app.

    Obviously, this is an experiment and you can’t count on the Publii team to support your custom version. Do that at your onw risk.

    Even being able to create a custom app, I would love to see an option to translate the interface integrated into the Publii app itself.

    As a tool that aims to ease the creation of a blog, it makes sense the be able to choose the app’s language.

    I hope this can help someone out there!

    #2607
    Verhoeckx

    Great that you were able to translate and build the app by yourself!!

    But I’m afraid that you have to do this every time there is a new version of Publii?

    It would be great if all the translatable words were in a separate file.

    So this will be your present for Mother’s Day?

    #2613
    rmego

    It would be great if all the translatable words were in a separate file.

    Yes, this is actually possible using ReplaceText, a freeware utility that can search and replace multiple text files at once.

    It’s quite handy. You enter both the text to be replaced and the translated version – for each file – and this little gem does the heavy lifting.

    So after creating a custom app for the first time, there’s significantly less work to be done when an update is available.

    So this will be your present for Mother’s Day?

    You bet – but it will also be a gift for myself (just don’t tell her 😉  ).

    #2614
    Verhoeckx

    😀

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.