NLS Utility
Class “NLSUtility” for Language Translations
Quick Facts
| Property | Value |
|---|---|
| Class | NLSUtility |
| Module | cenpylib.NLSUtility |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 7 |
Quick Start
# Boilerplate Example
obj = NLSUtility()Method Index
| Method | Returns | Summary |
|---|---|---|
__init__ | — | Initialization |
getETwoNLS | — | getting the set Language in E2 |
defineNLS | — | Sets the desired Language, Project Name(optional) and PlugIn Path(optional) |
setNLSLanguage | — | Checks and sets the desired Language |
readInNLSFile | — | Reads the Language File and save it to a List. |
getNLS | — | Returns the desired Item if translated, otherwise Default taken. |
replaceNLS | — | Searches in a String for a chain of Characters and replace it, if found, with a desired String and returns this. |
Lifecycle
__init__
def __init__()Initialization
Query Methods
getETwoNLS
def getETwoNLS(Operator)getting the set Language in E2
Parameters:
| Name | Type | Description |
|---|---|---|
Operator | — | the CENPyOlpProgramModifyOperator |
readInNLSFile
def readInNLSFile(project, altpath)Reads the Language File and save it to a List.
Parameters:
| Name | Type | Description |
|---|---|---|
project | — | sets the requested NLS Project “common”, “report”, etc. |
altpath | — | the alternative Location of the LanguageFiles (customized NLS) |
getNLS
def getNLS(name, default='')Returns the desired Item if translated, otherwise Default taken.
Parameters:
| Name | Type | Description |
|---|---|---|
name | — | the NLS-Item |
default | — | the default Translation if NLS-Item not found (default: '') |
Mutation Methods
setNLSLanguage
def setNLSLanguage(language)Checks and sets the desired Language
Parameters:
| Name | Type | Description |
|---|---|---|
language | — | the desired NLS Language |
replaceNLS
def replaceNLS(instring, searchstr, replacestr)Searches in a String for a chain of Characters and replace it, if found, with a desired String and returns this.
Parameters:
| Name | Type | Description |
|---|---|---|
instring | — | the Base String with the to be replaced Item |
searchstr | — | the String to be searched and replaced |
replacestr | — | the String for replacing |
Utilities
defineNLS
def defineNLS(language='', project='', altpath='')Sets the desired Language, Project Name(optional) and PlugIn Path(optional)
Parameters:
| Name | Type | Description |
|---|---|---|
language | — | the desired NLS Language, if empty determine the Systems Language (default: '') |
project | — | sets the requested NLS Project “common”, “report”, etc.(optional, default “common” if not set) (default: '') |
altpath | — | alternative Path for own customized PlugIn NLS Files (optional) (default: '') |
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?