Skip to main content

WOVN Ignore Feature

The wovn.ignore property allows you to exclude specific views from WOVN's translation and reporting functionalities. This is useful for protecting sensitive information or content that should not be translated.

Use Cases

  • Sensitive Data: Exclude views containing personal information, passwords, or financial data
  • Dynamic Content: Exclude views with user-generated content that shouldn't be reported
  • Technical Content: Exclude code snippets, IDs, or technical identifiers that shouldn't be translated

Usage

To exclude a view from translation, set the wovn.ignore property to true:

targetView.wovn.ignore = true

To re-enable translation for a previously ignored view:

targetView.wovn.ignore = false

To check if a view is currently being ignored:

print(targetView.wovn.ignore) // true or false

Best Practices

When to Call

It is recommended to set wovn.ignore = true before the view is added to the screen, ideally before the viewDidLoad method of the ViewController. This ensures that the view is not translated when it is first displayed.

Example

class ProfileViewController: UIViewController {
@IBOutlet weak var userEmailLabel: UILabel!
@IBOutlet weak var userPhoneLabel: UILabel!
@IBOutlet weak var accountIdLabel: UILabel!

override func viewDidLoad() {
super.viewDidLoad()

// Exclude sensitive user data from translation
userEmailLabel.wovn.ignore = true
userPhoneLabel.wovn.ignore = true
accountIdLabel.wovn.ignore = true
}
}

Hierarchy Behavior

When you set wovn.ignore on a parent view, all child views within that hierarchy will also be excluded from translation:

// Ignoring a parent view will ignore all its subviews
sensitiveContainerView.wovn.ignore = true
// All labels, buttons, etc. inside sensitiveContainerView will be ignored
  • Protect User Privacy - Overview of privacy protection features (see Getting Started section)
  • Manual Translation - Manually translate specific views (see Features section)