The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Discussion of non-graphical data: Properties, Property Expressions, Classifications, Interactive Schedules

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy

User avatar
By bouhmidage
Thanks LaszloNagy !

It works yes, but teadious for 1200 name :p

i'm searching for a way to automate this
in XML, there is a function that highlights all same words, so , this inspires me , it may work :

* Search for <name>

* Highlight them

* select lines with highlited names

* Copy lines to a new file

* translate them with translate function ( it exists )

* Copy them back to replace lines ( i think there is a function like this, i did some researches)

It may work after some research, that would be a huge help for the community
User avatar
By runxel
Sure enough a small Python (or whatever floats your boat) script could handle this easily.
Only the automatic translation would be "tricky"; I mean, we all know the quality of those :D
User avatar
By poco2013
Actually this is "somewhat" doable in Python using Google's google_trans_new module, which uses the Goolge translator site.

One: Google site has a limit and will periodically shut down without warning if overused. You can purchase a paid service.

two: The translations are not very Good.

Three: Some English words or phases will translate to the same French word or Phase. This will cause duplicate ID's and invalid the XML file. I worked around the problem by appending a line count to the end of any duplicate phase to make it unique. This may not be acceptable.

Four: Since the translations may not be acceptable-- they would still have to be manually reviewed. This somewhat defeats the purpose.

I have attached a French translation XML
(8.91 KiB) Downloaded 4 times
from Google to demonstrate the possibilities.