Language translation retrieval¶
This operation reads the LANGUAGE_TRANSLATION table for one exact translation row or for a broader collection keyed by language and optional gender. It supplies translation support to higher-level lookup helpers in the library.
| Field | Value |
|---|---|
| Operation ID | OP-SB-05 |
| Trigger | Caller invokes GetLanguageTranslation or instantiates a translation collection criteria object. |
| Inputs | Language code, gender code, lookup value |
| Outputs | clsLanguageTranslation or clsLanguageTranslationCollection |
| Primary components | clsLanguageTranslation.GetLanguageTranslation, clsLanguageTranslation.Criteria.BeforeRetrieve, clsLanguageTranslationCollection.Criteria.BeforeRetrieve |
| Entry point | Business\SAIF.Business\clsLanguageTranslation.vb |
Steps¶
- Single-row retrieval builds criteria from a language code, gender code, and lookup value.
- The criteria execute the exact-match translation SQL against
LANGUAGE_TRANSLATION, using all three fields to find the requested row (SQL-031, LANGUAGE_TRANSLATION). - After retrieval, the object copies the translated text and associated codes into
clsLanguageTranslationand returns it to the caller. - Collection retrieval chooses one of three shapes: all rows, language-only rows, or language-plus-gender rows.
- The collection criteria execute the corresponding
LANGUAGE_TRANSLATIONquery and apply whichever filters were enabled by the constructor path (SQL-032, LANGUAGE_TRANSLATION). AfterRetrievewraps each row in a translation item and returns the collection for later lookup or enumeration.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Translation request]) --> Type{Single row or collection?}
Type -->|Single| Single[Query exact language, gender, and lookup value]
Type -->|Collection| Collection[Query all, by language, or by language and gender]
Single --> Return1([Return translation])
Collection --> Return2([Return collection])
Failure and edge-case behavior¶
- Exact-match lookups return an empty object when no row exists for the supplied language, gender, and lookup value.
- Collection constructors determine the filter shape up front, so later callers only receive the rows allowed by that constructor path.
Related documentation¶
Sources¶
Business\SAIF.Business\clsLanguageTranslation.vbBusiness\SAIF.Business\clsLanguageTranslationCollection.vb