Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Raise Exception when a term is missing?

[SOLVED] Raise Exception when a term is missing? 2 months 2 weeks ago #3223

  • impbox
  • impbox's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Hi,

I've just started using I2 Localization, however when I SetTerm to a term that doesn't yet have an entry, there's no indication that there's a problem to resolve, it seems to silently fail and leave the default text.

Is there a way to detect which terms have been set while running but don't have entries or translations?

Thanks!
Last Edit: 2 months 2 days ago by impbox. Reason: Solved
The administrator has disabled public write access.

Raise Exception when a term is missing? 2 months 2 weeks ago #3224

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1139
  • Thank you received: 243
  • Karma: 72
Hi,
Setting an invalid term is also useful sometimes and the plugin handles them a bit differently.

When you set a term, the Localize component looks it up in one of the LanguageSources you created. If its found, then its translation is used, parameters, plurals, etc.

However, when the term is empty or can't be found, then the plugin tries to infer it from the label it is trying to localize. It takes the text of the label and see if there is a term with that name, if so, it uses that term.
That its very useful when you are setting your translations, given that you can select all your labels, add a Localize component to them, and without setting a term for each of them, the plugin finds automatically the corresponding term based on the text. (e.g. if the label reads "Play", then it finds for that in the LanguageSource and replaces the text for its translation to the current language)
This is also useful when you are changing the term dynamically using a 3rd party plugin that only knows how to modify the Label's text (e.g. Flow Dialogs and other similar plugins). In that case, you just set the term to empty, and as soon as someone modifies the label's text, it uses that as the term name.

Said that, there is a way to override that behavior:
In the Language's Tab there is a popup for selecting what should happen when a term is missing:
www.inter-illusion.com/forum/i2-localiza...-notes?start=24#1670


Hope that helps,
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.

Raise Exception when a term is missing? 2 months 2 days ago #3239

  • impbox
  • impbox's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Sorry I took so long to reply! Thanks very much for that!

I didn't realise that would help because I was concerned about the Term being missing rather than the Translation, but this works for both.
The administrator has disabled public write access.

[SOLVED] Raise Exception when a term is missing? 1 day 14 hours ago #3306

  • fbarraza28
  • fbarraza28's Avatar
Jordan 11 Space Jam
Fenty Puma
Michael Kors Canada
Lebron 15
Jordan 11 GYM Red
Pandora
Pandora Bracelet
Pandora Charm
KD 10
Adidas Yeezy
Birkenstock Sandals For Men
Nike Air Max
[url=http://www.nike--outlet.us.com/]Nike Outlet[/url]
Adidas NMD
[url=http://www.adidas--yeezy.us.com/]Adidas Yeezy[/url]
Christian Louboutin
Yeezy Boost 350
Nike Vapormax
Ralph Lauren Outlet
Pandora Jewelry
Adidas Outlet
Pandora Rings
Adidas Yeezy
Louboutin Shoes
Air Max 95
Longchamp
Louboutin Shoes
[url=http://www.pandora--jewelry.us.com/]Pandora Jewelry[/url]
Jordan Retro 11
Ralph Lauren Outlet
Pandora Jewelry
Nike Air Uptempo
Pandora Jewelry Official Site
Birkenstock Shoes
Kyrie Irving Shoes
Nike Vapor Max
Yeezy Boost 350 V2 Beluga 2.0
Harden vol 1
Air Max 2018
Yeezy boost 350 v2
Pandora Rings
Nike Air Max
Adidas NMD
North Face Jackets Clearance
Moncler UK
Nike Kyrie 3
Kyrie 4
Vans Store
Nike Air Force 1
[url=http://www.nike--shoes.us.com/]Nike Shoes[/url]
Kyrie Irving Shoes
Adidas Outlet
Kate Spade Outlet
Stephen Curry Shoes
Air Max 90
Coach Outlet
Curry 4
Red Bottoms
Air Max 90
Christian Louboutin Shoes
Ralph Lauren Outlet
North Face Jackets For Women
Pandora
Soccer Cleats
Yeezy
Nike Lebron 15
Huaraches Nike
Louboutin Shoes
[url=http://www.nikeoutlet--store.us.com/]Nike Outlet[/url]
Red Bottom Shoes For Women
Moncler Outlet
Coach Outlet Online
Lebron Shoes
Nike Cortez Men
Pandora Outlet
Jimmy Choo Shoes
Pandora Jewelry
Nike Kyrie 3
Birkenstock Outlet
Longchamp Handbags
[url=http://www.ralph--lauren.us.com/]Ralph Lauren[/url]
Vans Outlet
Yeezy 350 V2
Nike KD Shoes
Coach Outlet
Air Jordan 11
Longchamp Handbags
Timberlad Boots
[url=http://www.puma--shoes.us.com/]Puma Shoes[/url]
Pandora Charms
Adidas Shoes
Clarks Shoes
Pandora Jewelry Official Site
New Jordans
Timberland Boots For Men
Kate Spade New York Outlet
Ralph Lauren Outlet Store
NMD
Skechers Women
Blue Tint Yeezy
Goyard Bags
Michael Kors Outlet
Yeezys
Adidas Ultra Boost
James Harden shoes
Adidas Shoes
Birkenstock
Air Max Shoes
KD 10
Jordans 11
The administrator has disabled public write access.
Time to create page: 0.218 seconds
Template by JoomlaShine