Adding German Language to project

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Adding German Language to project

Post by boyddt_co »

Powershell Studio 2021 build 5.8.188
Windows 10
Powershell v5.1.17763.1852

I'm creating a site checking app and the end-users are now asking that I translate it into German, is there an easy way to do this?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Adding German Language to project

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Adding German Language to project

Post by jvierra »

Place all of the strings in a file and change the file. Issue - string length and font affects.

Since PowerShell is not MUI capable then there is no method I know to use MUI to dynamically alter the strings according to language.

In console apps it is easy to just alter the strings at runtime by loading them from a file. In forms apps then you have to consider the affect of both sets of strings on the displayed form.

For small apps it is almost always easier to just build two versions.

viewtopic.php?t=10674

For the formal methods see: https://docs.microsoft.com/en-us/window ... pplication
User avatar
boyddt_co
Posts: 89
Last visit: Mon Sep 25, 2023 9:36 pm

Re: Adding German Language to project

Post by boyddt_co »

Windows 10
Powershell Studio 5.8.188
PowerShell v5.1.17763.1852

hello, I was able to get the language switch to work as expected, thank you. What I'm struggling with now is formatting. what I'd like to get is the following. I tried to add a `r`n into the text and it was just inserted as text. I tried using quotes and those were duplicated and added as text. I attached the project files.

Server / URL
- Green: system responded to ping
- Red: system did not respond to ping
- Blue: system was not pinged

Ports
- Green: Port was listening
- Red: Port was not listening
- Orange: Port is filtered
Attachments
Globals.zip
(219.79 KiB) Downloaded 144 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Adding German Language to project

Post by jvierra »

Sorry but we cannot analyze and debug a whole large project. That is beyod the scope of this forum. Ask a single specifc question and provide the simplest code example that illustrates the issue.

Consider the followin. There is likely no way to un your code off myour system. Akso yu seem to be assking many unrela5ted questions in one request.

Buil one small PSF that shows thee issue using the minimum code necessary, Post that as a starter.

Also be sure to use the debugger to see how your code is being executed.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked