Foundation 6

Fnd_Loc

20 shared methods.

Fnd_Loc_ArrayToList

Fnd_Loc_ArrayToList($array_ptr;$listName_t)

Updates list in the host database.

ParameterTypeDirectionDescription
arrayPointerinThe text array
listNameTextinThe list name

Fnd_Loc_DuplicateList

Fnd_Loc_DuplicateList

Duplicates a 4D list. Used for creating new localizations.

No parameters.

Fnd_Loc_Editor

Fnd_Loc_Editor ({number})

Displays the Localization List Editor window in a new process.

ParameterTypeDirectionDescription
inNumberLongintinUsed internally by this method

Fnd_Loc_Editor_ArrayToList

Fnd_Loc_Editor_ArrayToList (->array; list name)

A wrapper for 4D's ARRAY TO LIST command. This routine always appends an asterisk to the list name, so that we don't mess up the original.

See also the Fnd_Loc_ListToArray method.

ParameterTypeDirectionDescription
arrayPointerinThe text array
inListNameTextinThe list name

Fnd_Loc_Editor_ClickOnCodesList

Fnd_Loc_Editor_ClickOnCodesList

Called from the localization editor when a lookup code is clicked, or when a higher-level list is clicked.

No parameters.

Fnd_Loc_Editor_ClickOnGroupList

Fnd_Loc_Editor_ClickOnGroupList

Called from the localization editor when a group item is clicked, or when a higher-level list is clicked.

No parameters.

Fnd_Loc_Editor_ClickOnModsList

Fnd_Loc_Editor_ClickOnModsList

Called from the localization editor when a module name is clicked, or when another object changes the selected list item

No parameters.

Fnd_Loc_Editor_EditorClosed

Fnd_Loc_Editor_EditorClosed --> Boolean

Makes sure 4D's List Editor window isn't open. If it is, the user is asked to close it.

ParameterTypeDirectionDescription
ResultBooleanoutTrue if the List Editor is not open

Fnd_Loc_Editor_Export

Fnd_Loc_Editor_Export

Exports a text file and saves it as a 4D list.

Designed to be called from the Localization Editor dialog. Don't call directly.

No parameters.

Fnd_Loc_Editor_Import

Fnd_Loc_Editor_Import

Imports Foundation localization lists.

Designed to be called from the Localization Editor dialog. Don't call directly.

No parameters.

Fnd_Loc_Editor_LoadModules

Fnd_Loc_Editor_LoadModules

Loads the array of Modules names in the Localization Editor window.

No parameters.

Fnd_Loc_Editor_SaveList

Fnd_Loc_Editor_SaveList

Saves changes back to the 4D Lists.

No parameters.

Fnd_Loc_FixButtonWidths

Fnd_Loc_FixButtonWidths (->button1; ->button2{; ->buttonN})

Adjusts all of the button widths of two or more _vertically_aligned_ buttons so they all have the same left and right coordinates of the widest button of the group. Designed to be called after calling Fnd_Gen_ButtonText on each of the buttons in the group.

ParameterTypeDirectionDescription
$1PointerinA pointer to a button
$2..$NPointerinMore button pointers

Fnd_Loc_FixLabelWidths

Fnd_Loc_FixLabelWidths (->form object; ->enterable object{; ..repeat..})

Used for aligning one or more sets of labels and enterable fields.

Start by localizing the label text. Then pass a pointer to it and the field next to it to this routine. This routine will properly size the label for its new text, and move the left side of the associated field so that it remains an equal distance from the label as it appears on the form.

If you pass multiple label/field sets to this routine, it will adjust them so they all work with the longest label text width.

ParameterTypeDirectionDescription
$1, $3, $5, etc.PointerinThe name of the label to adjust
$2, $4, $6, etc.PointerinThe field to its right

Fnd_Loc_GetString

Fnd_Loc_GetString (module name; internal string{; param 1{; param 2...}}) --> Text

Gets the localized string based on the internal string or label. Also replaces any parameters. For example, "<<1>>" gets replaced with the first optional parameter, "<<2>>" with the second optional parameter, etc.

ParameterTypeDirectionDescription
$1TextinThe Foundation module name
$2TextinThe internal string label
$3..$nTextinReplacement strings (optional)
$0TextoutThe localized string

Fnd_Loc_Info

Fnd_Loc_Info (label) --> Text

Returns requested information. See the Fnd_Gen_ComponentInfo method for more information.

ParameterTypeDirectionDescription
requestTextinInfo desired ("version" or "name" or "language")
ResultTextoutResponse

Fnd_Loc_LanguageCode

Fnd_Loc_LanguageCode ({code}) --> Text

If no parameters are passed, this routine returns the current language code that Foundation is using for localization. If a language code is passed to this routine, it's set as the new localization code.

ParameterTypeDirectionDescription
inCodeTextinThe language code to use (optional)
ResultTextoutThe current langauge code

Fnd_Loc_ListToArray

Fnd_Loc_ListToArray (list name; ->array)

A wrapper for 4D's LIST TO ARRAY command. Tries to read in a list with an asterisk appended to the name first. If all it gets is an empty list (which probably indicates no list) then it tries to read in a list without the asterisk.

A host without a Fnd_Host_ListToArray method gets an empty array and one bug report per session naming the missing method.

See also the Fnd_Loc_Editor_ArrayToList method.

ParameterTypeDirectionDescription
listNameTextinThe list name
arrayPointerinThe text array

Fnd_Loc_LoadStringList

Fnd_Loc_LoadStringList (module name)

Loads arrays with localized strings.

ParameterTypeDirectionDescription
moduleNameTextinThe Foundation module name (eg: "Fnd_Dlg")

Fnd_Loc_SetLocalizationStrings

Fnd_Loc_SetLocalizationStrings (component code; ->lookup codes; ->strings)

Allows a component to use its Fnd4-style localization strings.

Similar to Fnd_Loc_LoadStringList, but designed to work with Fnd5 components.

ParameterTypeDirectionDescription
componentTextinThe component code (e.g.: "Fnd_Menu")
lookupCodesPointerinA text array of translation lookup codes
stringsPointerinA text array of localized strings