Issue display km/mi

Hi all,

I need help pls…

To display km or mile, I set the opacity
KM → (([LANG_LOC]==“en_GB”)+([LANG_LOC]==“en_US”))? 0: 100
MI → (([LANG_LOC]==“en_GB”)+([LANG_LOC]==“en_US”))? 100: 0

Testing in WFS,
I change the Language. Yes it display correctly
Language = English(UK), show MI
Language = English(USA), show MI
Language = English(Singapore) or any other, show KM.

But recently, User from US feedback, my watchface show distance in KM!!??
If they click from Step, then scroll down, distance(from watch/system) show correctly is MI.

I don’t know where is my mistake, is the above formula for opacity correct?

How to test this in physical device?
I try to set my phone Language and region to Language = English, Region = US,
my wf still display distance in KM… :sweat_smile:

Thanks,
LayYuan

MILE:
([TMZN_ID]==“Europe/London” || [TMZN_ID]==“Europe/Dublin” || [TMZN_ID]==“America/New_York” || [TMZN_ID]==“America/Los_Angeles” || [TMZN_ID]==“America/Chicago” || [TMZN_ID]==“America/Denver” || [TMZN_ID]==“America/Phoenix” || [TMZN_ID]==“America/Toronto” || [TMZN_ID]==“America/Vancouver” || [TMZN_ID]==“America/Montreal” || [TMZN_ID]==“America/Port_of_Spain” || [TMZN_ID]==“America/Jamaica” || [TMZN_ID]==“Africa/Monrovia” || [TMZN_ID]==“Asia/Yangon” ? 100 : 0)

KM:
([TMZN_ID]==“Europe/London” || [TMZN_ID]==“Europe/Dublin” || [TMZN_ID]==“America/New_York” || [TMZN_ID]==“America/Los_Angeles” || [TMZN_ID]==“America/Chicago” || [TMZN_ID]==“America/Denver” || [TMZN_ID]==“America/Phoenix” || [TMZN_ID]==“America/Toronto” || [TMZN_ID]==“America/Vancouver” || [TMZN_ID]==“America/Montreal” || [TMZN_ID]==“America/Port_of_Spain” || [TMZN_ID]==“America/Jamaica” || [TMZN_ID]==“Africa/Monrovia” || [TMZN_ID]==“Asia/Yangon” ? 0 : 100)

2 Likes

Guys, why dont you let user decide to use KM or MI ?
If Im US guy temporary live in EU - I need to use KM, why not MI ?

2 Likes

Try * instead of +.

(Post must be at least 20 characters.)

1 Like

I do that too. I just create 2 versions KM Text, MI Text, mask it, style, customization editor, and then it’s customizable to the user.

4 Likes

Thank you very much Ozan

I try copy/paste ur formula, but it not work for me.

Found this thread, it mention about copy/paste “” issue.
Problem solved, I change to below formula.
MI → 100*(([LANG_LOC]==“en_GB”)+([LANG_LOC]==“en_US”))
KM-> 100*!(([LANG_LOC]==“en_GB”)+([LANG_LOC]==“en_US”))

Thanks,
LayYuan

1 Like

Thanks Gondwana,

but I think + is correct.

  • is AND, + is OR, in this case, it need use OR right…?

Yes, this is the best way, but I don’t know how to implement it with WFS

Wow!!! it is good if can lets user choose km/mi.
How u do it? Can u pls tell more about it?
U mean mask KM text, Mi text?
Style only can use in Image, how to add style in text?

Thank you very much!
LayYuan

1 Like

Sorry, you’re correct. Glad you got it going.

It’s not complicated, but it is certainly complicated to explain :smile: it is based on using masking of a transparent.png and a white.png oner the km/mi text.

I set it up like this:

  • create Text KM & Miles, make sure the height and width are the same and location and orientation is the same so they are basically on top of each other

  • I have made 1x1 pixel .png one is transparent, one is white

  • over the KM text I put the white.png above it and resize it to the same size as KM text/same location.

  • next is to then select the white.png and then create style and swap it with the 1x1 pixel transparent.png

  • then select the KM text layer and the white.png layer and make a mask.

then you repeat the process with MILES but you put the transparent.png (same size, same location as MILES) and swap the one with the 1x1 white pixel in style

then in customization editor combine them into the same style. Also rename in to something you want like “Switch KM/MILES”.

Screenshot 2024-09-03 at 9.45.10 AM

then the user will have the option to switch KM/Miles in “customize”

It has worked so far but lately I have been having so many problems with a couple of my faces that I use this method on that keep getting rejected for “crashing/failing to launch on install” so maybe this could be the reason why? Google won’t tell me so I don’t know. :crazy_face:

4 Likes