Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
9 January 2025
In this episode we will analyze two troublesome situations for translators, which can be avoided if the developer is careful.
Namely do not concatenate strings for translations: "Save" + count + "files", and handling of plural cases "Saved" + count + "file(s)"
Links:
* heaptrack: https://www.kdab.com/heaptrack-v1-0-0-release/
Chapters:
0:00 introduction
00:28 The tr function and placeholders
02:32 Warning about the arg function
05:38 "Loaded 1 file(s)" and the solution
09:17 Advertise - heaptrack
09:37 English to English translations
10:58 English to English for CMake
11:32 Linguist
15:52 A problem without a solution
15:30 Goodbuy
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets/internationalization
All 'Introduction to Qt Widgets - Module 1' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hgf7zCKF2Rv9Y0WoN8RVGf
All 'Introduction to Qt Widgets - Module 2' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6j_c41CFMprvg9EiWz0WdSy
All 'Introduction to Qt Widgets - Module 3' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6hWZO_viEf1rfjgk4E6SCKd
All 'Introduction to Qt Widgets - Module 4' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6iXUNQMb2GkEjV_oK6Xid9-
All 'Introduction to Qt Widgets - Module 5' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6h1tsLAETdrrFlsVMeYpiHI
All 'Introduction to Qt Widgets - Module 6' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6jIsRYriqN70V83t_mdDZHT
All 'Introduction to Qt Widgets - Module 7' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hHyqD9ZxUqpd14LoHvadN7
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more