Translate dates to Chinese numbers
I have a curly requirement for a label on product being exported from New Zealand to China.
I need to print best before and production dates in Chinese numbers eg:
Production Date: 2021/11/02
生产日期: 二〇二一年十一月二日
Best before: 2023/11/02
最佳品尝期限: 二〇二三年十一月二日
The customer has supplied the Chinese (simplified) text for the static words Production date 生产日期 and Best before 最佳品尝期限 The dates will be dynamic
I have no knowledge of scripting this transformation. Can anyone help?
-
Hi Mike!
Welcome to the BarTender Community!
We could try using multiple Search and Replace Transform actions in order to seek particular dates and translate them to Chinese:
We would need to create quite a few actions, but I believe this would help us work around this issue. For example with these 3 actions I've managed to convert the date fully from 2021/11/02 to the desired output:
Now, we would need to create at least 44 actions for this method to work, one for each day, month, and year we want to use. However, I believe it'll be quicker than delving ourselves into VBscripting.
You can learn more about Search and Replace Transform actions here.
Let us know if this was of use!0 -
Thanks Xabier.
This works nicely. I have a prompted date data type embedded object to allow users to pick from the date selector and an "object value" object with text data type for the translation
0 -
You are welcome Mike!
Thank you for letting us know this worked for you.
We could have also used BarTender's VBscript or pulled the correct data from a database and replaced it. There are plenty of workarounds in order to achieve this.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare