Using a different language in a VAR than system

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Chris
Valued Contributor
Posts: 43
Joined: Wed Oct 25, 2006 5:54 pm

Using a different language in a VAR than system

Post by Chris » Fri Dec 28, 2007 10:00 pm

Hi

I must create a label that includes a date variable.
It has to be a weekday and a month.

Problem is that where going to use 8 different languages.

Sadly, I only speak half of them.

Is it possible for Nice Label to do that other than using a script?

Thanks

User avatar
Saso
NiceLabel
NiceLabel
Posts: 2988
Joined: Mon Sep 04, 2006 8:09 am
Contact:

Post by Saso » Sun Dec 30, 2007 5:18 pm

Use VB script. :wink:

You do not have to write any long scripts or use lookup tables to get the day/month names from some internal arrays.

Jus use VB script's built-in functionality.
You can change the system locale setting, get the name of the day/month and use it in some variable.

The function is SetLocale.

You can use it like this:

Code: Select all

Dim a

SetLocale("en-us")
a = WeekdayName(WeekDay(Now()))
MsgBox("English: " & a)

SetLocale("de")
a = WeekdayName(WeekDay(Now()))
MsgBox("German: " & a)

SetLocale("es")
a = WeekdayName(WeekDay(Now()))
MsgBox("Spanish: " & a)
Today the result from this script will be (it is Sunday today):
- English: Sunday
- German: Sonntag
- Spanish: domingo

Also see the VB script help file and locate the topic Locale ID (LCID) Chart. You will see all available locale strings, like "en-uk", "de" and similar...
Saso Fleiser
Senior Technical Product Specialist

Chris
Valued Contributor
Posts: 43
Joined: Wed Oct 25, 2006 5:54 pm

Post by Chris » Mon Dec 31, 2007 3:18 pm

Thanks Saso.

I'll test it today.

Post Reply