On 04/19/2017 02:52 AM, Domen Vrankar wrote:
> I somewhat understand the wish of non programmers to see text in
> their own language but for developers english is de facto programming
> standard language so I don't see a reason for such an addition.

This is a good point.  I'd be hesitant to move forward with anything
in upstream CMake without broader interest.

> Or taking that even further by defining maps:
>> set(GREETING "greeting message" "en:Hello, world!" "ru:Привет, мир!")
>> message(${GREETING}) # prints "greeting message"
>> message(${GREETING:}) # also prints "greeting message"
>> message(${GREETING:en}) # prints "Hello, world!"
>> message(${GREETING:ru}) # prints "Привет, мир!"

This can be done already in the CMake language:

```
set("en.GREETING" "Hello world!")
set("ru.GREETING" "Привет, мир!")
set(l10n ru)
message(STATUS "${${l10n}.GREETING}") # Привет, мир!
```

A macro or function could be used to improve the ergonomics of
defining the table.

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to