IMPORTANT NOTICE - Apr-30-2009:
This .NET implementation of Okapi is no longer actively developed.
Instead, a NEW JAVA IMPLEMENTATION IS AVAILABLE and is being actively developed.

The material on this Web site is for archive propose. Some applications of the old .NET implementation (e.g. Olifant) will be maintained to some degree until they have a replacement in the Java project.

Okapi Framework

Localization Directives Interface Specification

Revision information: Version 1.1
     Latest revision: http://okapi.sourceforge.net/ILocalizationDirectives.html

- Document Status
- Overview
- Methods

Document Status

This document is a stable specification. Feedback about the content of this document is encouraged. Send your comments to the Okapi Framework administrator, or alternatively to post them in the Okapi Tools users group.

DISCLAIMER: Parts of the documents are generated automatically from the source code documentation of Okapi's implementation of the specification. Because the generation tool is not completely working yet, this may result in incomplete or broken text or links in this document. See the source code documentation of the interface for complete text.

Overview

The Okapi Localization directives Interface is an object model that provides a common way of accessing localization directives. It is used for example by the SetLocalizationDirectives method of the Filter Interface, allowing a filter to use another one to process a sub-set of the input of the first filter, and to carry the localization directives context across the two filters.

Other related specifications:

Methods

The Localization Directives Interface provides the following methods:

ILocalizationDirectives.Initialize

Initializes the log to use with this localization directives context.

ILocalizationDirectives.GetInterfaceVersion

Gets the version of the ILocalizationDirectives interface the object implements.

ILocalizationDirectives.Reset

Resets the context.

ILocalizationDirectives.SetOptions

Sets the main processing options.

ILocalizationDirectives.UseDirectives

Indicates if localization directives should be taken into account.

ILocalizationDirectives.UseDNLFile

Indicates if existing Do-Not-Localize list file should be taken into account.

ILocalizationDirectives.LocalizeOutside

Indicates if the extractable items outside the localization directives markers should be extracted.

ILocalizationDirectives.IsWithinScope

Indicates if there is currently a directive that would apply.

ILocalizationDirectives.IsLocalizable

Indicates if the current context is localizable or not.

ILocalizationDirectives.Process

Processes a text with localization directives.

ILocalizationDirectives.LoadDNLFile

Loads the corresponding DNL list file of the p_sBasePath file. If no corresponding file exists, no data is loaded and no error is reported.

ILocalizationDirectives.IsInDNLList

Queries if a given item is listed in the DNL lists.

ILocalizationDirectives.Initialize

Initializes the log to use with this localization directives context.

Parameters

Okapi.Library.Base.ILogp_LogThe log to use.

ILocalizationDirectives.GetInterfaceVersion

Gets the version of the ILocalizationDirectives interface the object implements.

Return

The version of the ILocalizationDirectives interface.

ILocalizationDirectives.Reset

Resets the context.

ILocalizationDirectives.SetOptions

Sets the main processing options.

Parameters

System.Booleanp_bUseDirectivesTrue if localization directives are to be used, false if they are to be ignored.
System.Booleanp_bLocalizeOutsideTrue if the items outside the scope of localization directives are to be localized.
System.Booleanp_bUseDNLFileTrue if existing any Do-Not-Localize list file is to be used.

ILocalizationDirectives.UseDirectives

Indicates if localization directives should be taken into account.

Return

True if the localization directives should be processed, false otherwise.

Remarks

Use the ILocalizationDirectives.SetOptions method to change this option.

ILocalizationDirectives.UseDNLFile

Indicates if existing Do-Not-Localize list file should be taken into account.

Return

True if DNL list file should be used, false otherwise.

Remarks

Use the ILocalizationDirectives.SetOptions method to change this option.

ILocalizationDirectives.LocalizeOutside

Indicates if the extractable items outside the localization directives markers should be extracted.

Return

True if the extractable items outside the localization directives markers are to be extracted, false if they should not be extracted.

Remarks

This option should be applied only when the localization directives are in use. Use the ILocalizationDirectives.SetOptions method to change the directives options.

ILocalizationDirectives.IsWithinScope

Indicates if there is currently a directive that would apply.

Return

True if there is a directive that applies, false if not.

ILocalizationDirectives.IsLocalizable

Indicates if the current context is localizable or not.

Parameters

System.Booleanp_bPopSingleTrue if the current context is to be popped back to its previous one.

Return

True if the current context is localizable, false if not.

ILocalizationDirectives.Process

Processes a text with localization directives.

Parameters

Stringp_sTextThe text that contains the directives.

ILocalizationDirectives.LoadDNLFile

Loads the corresponding DNL list file of the p_sBasePath file. If no corresponding file exists, no data is loaded and no error is reported.

Parameters

Stringp_sBasePathFule path of the base file of the DNL list file to load. For example the value "C:\Test\myFile.str" will try to load "C:\Test\myFile.str.dnl".

ILocalizationDirectives.IsInDNLList

Queries if a given item is listed in the DNL lists.

Parameters

Okapi.Library.Filter.IFilterItemp_ItemThe item to lookup.

Return

True if the searched text has been founded in the current list.

Remarks

You must load the DNL list file before calling this function. Use the ILocalizationDirectives.LoadDNLFile method for this. Implementers: The DNL list must have precedence over any embedded directives.