This is very needed for Live SketchUp model. I have to use exactly same name of a material as user sees on the screen in SketchUp UI.
Unfortunately none of the C API functions return in localized SU versions a correct display_name of a material, in case of materials coming straight from the SketchUp built-in library.
The whole mess with material.name and material.display_name is just creating more trouble for us developers.
It was really a problem with old C++ SDK and also is with the new C SDK, because they cannot get same translated material name. We are forced to go back then to Ruby model and find that material by .name and then get .display_name from it. It is very slow when a number of materials grow.
I understand that it is easier to supply same mat files for all localized SU versions. Couldn’t SketchUp 2020 just give both name and display name same full unicode name when a built-in material is added to a model, instead of “[Asphalt]” in name and “Something Black in a different language” in display name?
I guess SU Team wanted their models using default materials to “translate” nicely to other languages, but is it really that necessary?
I must say, it looks like even Thomas is not aware what square brackets are for in the material.name
Even the name of the function is wrong. It should be GetDisplayName() and return a translated name using internal language handler. It is not there just to remove the square brackets.