%SYS.NLS.Table
Class %SYS.NLS.Table Extends %RegisteredObject [ System = 4 ]
NLS tables can be divided into I/O (also called translation) and Internal tables, each type having a set of categories:
I/O tables
- Process
- InterSystems IRIS Terminal
- Other terminal
- File
- Magtape
- TCP/IP
- DSM-DDP
- DTM-DCP
- System call
- Printer Internal tables
- Pattern match
- Identifier
- Uppercase
- Lowercase
- Titlecase
- Accent
- Collation
- $X/$Y action For each category, a locale defines a set of available tables and selects one of them to be used as the system default. InterSystems distributes a set of read-only locales but users can create their own locales.
A configuration allows a different system default to be selected among the available tables. Configuration defaults are optional and independent of the locale. They persist across system reboots and updates.
At startup, the system defaults are set either from the configured defaults or from the locale defaults. Configuration defaults have precedence if defined; otherwise the locale defaults are used.
When a process starts it inherits all the system defaults. The process setting for I/O tables can still be overriden when opening a device by specifying "K\TableName\" in the OPEN parameters.
This class has properties that represent each of the above categories.
To get the Configured defaults, instantiate an object with
Set obj=##class(%SYS.NLS.Table).%New("Config")
To get the loaded System defaults, instantiate an object with
Set obj=##class(%SYS.NLS.Table).%New("System")
To get the loaded Process settings, instantiate an object with
Set obj=##class(%SYS.NLS.Table).%New("Process")
Changing a property for a Process object immediately changes the corresponding setting in the process, but it is not possible to change the properties of a system object. Changes to a Config object will only affect the next system reboot.
For generic locale properties see %SYS.NLS.Locale.
For current device NLS properties see %SYS.NLS.Device.
For date, time and number format properties see %SYS.NLS.Format.
Properties
Process
Property Process As %String;
IRISTerminal
Property IRISTerminal As %String;
OtherTerminal
Property OtherTerminal As %String;
File
Property File As %String;
Magtape
Property Magtape As %String;
TCPIP
Property TCPIP As %String;
DSMDDP
Property DSMDDP As %String;
DTMDCP
Property DTMDCP As %String;
SystemCall
Property SystemCall As %String;
Printer
Property Printer As %String;
PatternMatch
Property PatternMatch As %String;
Identifier
Property Identifier As %String;
Uppercase
Property Uppercase As %String;
Lowercase
Property Lowercase As %String;
Titlecase
Property Titlecase As %String;
Accent
Property Accent As %String;
Collation
Property Collation As %String;
XYAction
Property XYAction As %String;
CSP
Property CSP As %String;
State
Property State As %Boolean;
True if translation is ON
IsSystem
Property IsSystem As %Boolean [ Internal ];
IsConfig
Property IsConfig As %Boolean [ Internal ];
Methods
ProcessGet
Method ProcessGet() As %String [ Internal ]
ProcessSet
Method ProcessSet(table As %String) As %Status [ Internal ]
IRISTerminalGet
Method IRISTerminalGet() As %String [ Internal ]
IRISTerminalSet
Method IRISTerminalSet(table As %String) As %Status [ Internal ]
OtherTerminalGet
Method OtherTerminalGet() As %String [ Internal ]
OtherTerminalSet
Method OtherTerminalSet(table As %String) As %Status [ Internal ]
FileGet
Method FileGet() As %String [ Internal ]
FileSet
Method FileSet(table As %String) As %Status [ Internal ]
MagtapeGet
Method MagtapeGet() As %String [ Internal ]
MagtapeSet
Method MagtapeSet(table As %String) As %Status [ Internal ]
TCPIPGet
Method TCPIPGet() As %String [ Internal ]
TCPIPSet
Method TCPIPSet(table As %String) As %Status [ Internal ]
DSMDDPGet
Method DSMDDPGet() As %String [ Internal ]
DSMDDPSet
Method DSMDDPSet(table As %String) As %Status [ Internal ]
DTMDCPGet
Method DTMDCPGet() As %String [ Internal ]
DTMDCPSet
Method DTMDCPSet(table As %String) As %Status [ Internal ]
SystemCallGet
Method SystemCallGet() As %String [ Internal ]
SystemCallSet
Method SystemCallSet(table As %String) As %Status [ Internal ]
PrinterGet
Method PrinterGet() As %String [ Internal ]
PrinterSet
Method PrinterSet(table As %String) As %Status [ Internal ]
PatternMatchGet
Method PatternMatchGet() As %String [ Internal ]
PatternMatchSet
Method PatternMatchSet(table As %String) As %Status [ Internal ]
IdentifierGet
Method IdentifierGet() As %String [ Internal ]
IdentifierSet
Method IdentifierSet(table As %String) As %Status [ Internal ]
UppercaseGet
Method UppercaseGet() As %String [ Internal ]
UppercaseSet
Method UppercaseSet(table As %String) As %Status [ Internal ]
LowercaseGet
Method LowercaseGet() As %String [ Internal ]
LowercaseSet
Method LowercaseSet(table As %String) As %Status [ Internal ]
TitlecaseGet
Method TitlecaseGet() As %String [ Internal ]
TitlecaseSet
Method TitlecaseSet(table As %String) As %Status [ Internal ]
AccentGet
Method AccentGet() As %String [ Internal ]
AccentSet
Method AccentSet(table As %String) As %Status [ Internal ]
CollationGet
Method CollationGet() As %String [ Internal ]
CollationSet
Method CollationSet(table As %String) As %Status [ Internal ]
XYActionGet
Method XYActionGet() As %String [ Internal ]
XYActionSet
Method XYActionSet(table As %String) As %Status [ Internal ]
CSPGet
Method CSPGet() As %String [ Internal ]
GetCSPTable
ClassMethod GetCSPTable() As %String [ Internal ]
CSPSet
Method CSPSet(table As %String) As %Status [ Internal ]
StateGet
Method StateGet() As %Boolean [ Internal ]
StateSet
Method StateSet(state As %Boolean) As %Status [ Internal ]
GetIOTable
Method GetIOTable(index As %Integer) As %String
Gets the name of an I/O table
Parameter: index - table index
- Process
- InterSystems IRIS Terminal
- Other terminal
- File
- Magtape
- TCP/IP
- DSM-DDP
- DTM-DCP
- System call
- Printer
SetIOTable
Method SetIOTable(index As %Integer, table As %String) As %Status [ Internal ]
GetInternalTable
Method GetInternalTable(index As %Integer) As %String
Gets the name of an Internal table
Parameter: index - table index
- Pattern match
- Identifier
- Uppercase
- Lowercase
- Titlecase
- (reserved)
- (reserved)
- Accent
- Collation
- $X/$Y action
SetInternalTable
Method SetInternalTable(index As %Integer, table As %String) As %Status [ Internal ]
GetCOL
ClassMethod GetCOL(col As %Integer) As %String [ Internal ]
Get the name of a loaded collation
GetOffName
ClassMethod GetOffName(off As %Integer, typ As %String) As %String [ Internal ]
Get the table name associated with a shm offset
GetCharset
ClassMethod GetCharset() As %String [ Internal ]
Gets character set of current locale
DisplayToLogical
ClassMethod DisplayToLogical(ext As %String) As %String
Converts an external character set name to its internal name
Parameter:
- ext - External charset name (eg: "ISO-8859-2"). If it is already an internal name (eg: "UTF8"), it is returned unchanged (except that "Latin1" is returned as "RAW"). Returns:
- Internal name equivalent to ext (eg: "Latin2")
- "" if there is no internal equivalent to 'ext'
LogicalToDisplay
ClassMethod LogicalToDisplay(int As %String) As %String
Converts an internal character set name to its preferred external name
Parameter:
- int - Internal charset name (eg: "Latin2") Returns:
- Preferred external name (eg: "ISO-8859-2")
- "" if there is no internal charset 'int'.
%OnNew
Method %OnNew(src As %String) As %Status [ Internal ]