Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Translation

All examples are included with download of MBS FileMaker Plugin.

Translation.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 5
Value Lists 1
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields On
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Translation
11 fields defined, 1 record
Translation

Fields

Table Name: Translation - 11 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
PrimaryKey Normal, Text Auto-Enter: Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Unique identifier of each record in this table
          CreationTimestamp Normal, Timestamp Auto-Enter:
          • Creation timestamp
          Validation:
          • Only during data entry
          • Strict data type: 4 digit year
          • Not empty
          • Strict validation
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
          Date and time each record was created
                  CreatedBy Normal, Text Auto-Enter:
                  • Creation account name
                  Validation:
                  • Only during data entry
                  • Not empty
                  • Strict validation
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                  Account name of the user who created each record
                          ModificationTimestamp Normal, Timestamp Auto-Enter:
                          • Modification timestamp
                          Validation:
                          • Only during data entry
                          • Strict data type: 4 digit year
                          • Not empty
                          • Strict validation
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                          Date and time each record was last modified
                                  ModifiedBy Normal, Text Auto-Enter:
                                  • Modification account name
                                  Validation:
                                  • Only during data entry
                                  • Not empty
                                  • Strict validation
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                  Account name of the user who last modified each record
                                          Available Normal, Text Auto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              Languages Normal, Text Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: Minimal
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                From Language Normal, Text Auto-Enter:
                                                • Allow editing
                                                Validation:
                                                • Only during data entry
                                                Storage:
                                                • Repetitions: 1
                                                • Indexing: None
                                                • Automatically create indexes as needed
                                                • Index Language: German
                                                    To Language Normal, Text Auto-Enter:
                                                    • Allow editing
                                                    Validation:
                                                    • Only during data entry
                                                    Storage:
                                                    • Repetitions: 1
                                                    • Indexing: None
                                                    • Automatically create indexes as needed
                                                    • Index Language: German
                                                        Input Normal, Text Auto-Enter:
                                                        • Allow editing
                                                        Validation:
                                                        • Only during data entry
                                                        Storage:
                                                        • Repetitions: 1
                                                        • Indexing: None
                                                        • Automatically create indexes as needed
                                                        • Index Language: German
                                                            Output Normal, Text Auto-Enter:
                                                            • Allow editing
                                                            Validation:
                                                            • Only during data entry
                                                            Storage:
                                                            • Repetitions: 1
                                                            • Indexing: None
                                                            • Automatically create indexes as needed
                                                            • Index Language: German

                                                                Layout Objects: Translation

                                                                Regular Fields

                                                                Field Name: Translation::Available
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 114 pt
                                                                • Left: 138 pt
                                                                • Bottom: 145 pt
                                                                • Right: 391 pt
                                                                • Anchoring: Left, Top
                                                                Field Format:
                                                                • Edit Box
                                                                Field Behavior:
                                                                • Allow field to be entered: In Find mode, In Browse mode
                                                                • Touch keyboard type: Default for Data Type
                                                                • Go to next field using: Tab key
                                                                Yes

                                                                Field Name: Translation::Languages
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 149 pt
                                                                • Left: 138 pt
                                                                • Bottom: 223 pt
                                                                • Right: 391 pt
                                                                • Anchoring: Left, Top
                                                                Field Format:
                                                                • Edit Box
                                                                Field Behavior:
                                                                • Allow field to be entered: In Find mode, In Browse mode
                                                                • Touch keyboard type: Default for Data Type
                                                                • Go to next field using: Tab key
                                                                Yes

                                                                Field Name: Translation::From Language
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 227 pt
                                                                • Left: 138 pt
                                                                • Bottom: 258 pt
                                                                • Right: 391 pt
                                                                • Anchoring: Left, Top
                                                                Field Format: Field Behavior:
                                                                • Allow field to be entered: In Find mode, In Browse mode
                                                                • Touch keyboard type: Default for Data Type
                                                                • Go to next field using: Tab key
                                                                Yes

                                                                Field Name: Translation::To Language
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 227 pt
                                                                • Left: 541 pt
                                                                • Bottom: 258 pt
                                                                • Right: 794 pt
                                                                • Anchoring: Left, Top
                                                                Field Format: Field Behavior:
                                                                • Allow field to be entered: In Find mode, In Browse mode
                                                                • Touch keyboard type: Default for Data Type
                                                                • Go to next field using: Tab key
                                                                Yes

                                                                Field Name: Translation::Input
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 297 pt
                                                                • Left: 138 pt
                                                                • Bottom: 595 pt
                                                                • Right: 391 pt
                                                                • Anchoring: Left, Top
                                                                Field Format:
                                                                • Edit Box
                                                                Field Behavior:
                                                                • Allow field to be entered: In Find mode, In Browse mode
                                                                • Touch keyboard type: Default for Data Type
                                                                • Go to next field using: Tab key
                                                                Yes

                                                                Field Name: Translation::Output
                                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                • Top: 299 pt
                                                                • Left: 541 pt
                                                                • Bottom: 597 pt
                                                                • Right: 794 pt
                                                                • Anchoring: Left, Top
                                                                Field Format:
                                                                • Edit Box
                                                                Field Behavior:
                                                                • Allow field to be entered: In Find mode, In Browse mode
                                                                • Touch keyboard type: Default for Data Type
                                                                • Go to next field using: Tab key
                                                                Yes

                                                                Buttons

                                                                Button Properties Coordinates Script/Script Step
                                                                  Type:
                                                                • Text: Check Availability
                                                                  Additional Properties:
                                                                • Change to hand cursor over button
                                                                • Top: 114 pt
                                                                • Left: 426 pt
                                                                • Bottom: 149 pt
                                                                • Right: 590 pt
                                                                • Anchoring: Left, Top
                                                                Perform Script [ “Check Available” ]

                                                                Scripts:


                                                                Button Properties Coordinates Script/Script Step
                                                                  Type:
                                                                • Text: Check Languages
                                                                  Additional Properties:
                                                                • Change to hand cursor over button
                                                                • Top: 158 pt
                                                                • Left: 426 pt
                                                                • Bottom: 193 pt
                                                                • Right: 590 pt
                                                                • Anchoring: Left, Top
                                                                Perform Script [ “Check Languages” ]

                                                                Scripts:


                                                                Button Properties Coordinates Script/Script Step
                                                                  Type:
                                                                • Text: Translate
                                                                  Additional Properties:
                                                                • Change to hand cursor over button
                                                                • Top: 299 pt
                                                                • Left: 821 pt
                                                                • Bottom: 334 pt
                                                                • Right: 1003 pt
                                                                • Anchoring: Left, Top
                                                                Perform Script [ “Translate” ]

                                                                Scripts:


                                                                Value Lists

                                                                Value List Name Source Values On Layouts
                                                                Languages Field

                                                                Script Hierarchy

                                                                Check Available
                                                                Check Languages
                                                                Clear
                                                                Close
                                                                Translate

                                                                Next Script: [Check Languages]
                                                                Script Name Check Available
                                                                Run script with full access privileges Off
                                                                Siri Shortcut Visible Off
                                                                Include In Menu Yes
                                                                Layouts that use this script
                                                                Scripts that use this script
                                                                  Script Definition
                                                                  Script Steps
                                                                  • Set Variable [ $r; Value:MBS("Translation.Available") ]
                                                                  • If [ MBS("IsError") ]
                                                                  • Set Field [ Translation::Available; $r ]
                                                                  • Else If [ $r = 1 ]
                                                                  • Set Field [ Translation::Available; "Available" ]
                                                                  • Else [ ]
                                                                  • Set Field [ Translation::Available; "Not available" ]
                                                                  • End If
                                                                  Fields used in this script
                                                                  Scripts used in this script
                                                                    Layouts used in this script
                                                                      Tables used in this script
                                                                      Table occurrences used by this script
                                                                      Custom Functions used by this script
                                                                        Custom menu set used by this script

                                                                          Previous Script: [Check Available] Next Script: [Clear]
                                                                          Script Name Check Languages
                                                                          Run script with full access privileges Off
                                                                          Siri Shortcut Visible Off
                                                                          Include In Menu No
                                                                          Layouts that use this script
                                                                          Scripts that use this script
                                                                            Script Definition
                                                                            Script Steps
                                                                            • Set Variable [ $r; Value:MBS("Translation.SupportedLanguages") ]
                                                                            • If [ MBS("IsError") ]
                                                                            • Set Field [ Translation::Languages; $r ]
                                                                            • Else [ ]
                                                                            • Set Field [ Translation::Languages; $r ]
                                                                            • End If
                                                                            • Commit Records/Requests [ No dialog ]
                                                                            Fields used in this script
                                                                            Scripts used in this script
                                                                              Layouts used in this script
                                                                                Tables used in this script
                                                                                Table occurrences used by this script
                                                                                Custom Functions used by this script
                                                                                  Custom menu set used by this script

                                                                                    Previous Script: [Check Languages] Next Script: [Close]
                                                                                    Script Name Clear
                                                                                    Run script with full access privileges Off
                                                                                    Siri Shortcut Visible Off
                                                                                    Include In Menu Yes
                                                                                    Layouts that use this script
                                                                                      Scripts that use this script
                                                                                        Script Definition
                                                                                        Script Steps
                                                                                        • Set Field [ Translation::Available; "" ]
                                                                                        • Set Field [ Translation::Languages; "" ]
                                                                                        • Set Field [ Translation::From Language; "" ]
                                                                                        • Set Field [ Translation::To Language; "" ]
                                                                                        • Set Field [ Translation::Output; "" ]
                                                                                        • Commit Records/Requests [ No dialog ]
                                                                                        Fields used in this script
                                                                                        Scripts used in this script
                                                                                          Layouts used in this script
                                                                                            Tables used in this script
                                                                                            Table occurrences used by this script
                                                                                            Custom Functions used by this script
                                                                                              Custom menu set used by this script

                                                                                                Previous Script: [Clear] Next Script: [Translate]
                                                                                                Script Name Close
                                                                                                Run script with full access privileges Off
                                                                                                Siri Shortcut Visible Off
                                                                                                Include In Menu Yes
                                                                                                Layouts that use this script
                                                                                                  Scripts that use this script
                                                                                                    Script Definition
                                                                                                    Script Steps
                                                                                                    • If [ IsEmpty ( $$session ) ]
                                                                                                    • #already done
                                                                                                    • Else [ ]
                                                                                                    • #cleanup
                                                                                                    • Set Variable [ $r; Value:MBS("Translation.Release"; $$session) ]
                                                                                                    • Set Variable [ $$session; Value:"" ]
                                                                                                    • Set Variable [ $$Languages; Value:"" ]
                                                                                                    • End If
                                                                                                    Fields used in this script
                                                                                                      Scripts used in this script
                                                                                                        Layouts used in this script
                                                                                                          Tables used in this script
                                                                                                            Table occurrences used by this script
                                                                                                              Custom Functions used by this script
                                                                                                                Custom menu set used by this script

                                                                                                                  Previous Script: [Close]
                                                                                                                  Script Name Translate
                                                                                                                  Run script with full access privileges Off
                                                                                                                  Siri Shortcut Visible Off
                                                                                                                  Include In Menu Yes
                                                                                                                  Layouts that use this script
                                                                                                                  Scripts that use this script
                                                                                                                    Script Definition
                                                                                                                    Script Steps
                                                                                                                    • Set Variable [ $Languages; Value:Translation::From Language & " -> " & Translation::To Language ]
                                                                                                                    • #Do we need a new session?
                                                                                                                    • If [ $$languages ≠ $Languages or IsEmpty ( $$session ) ]
                                                                                                                    • If [ not IsEmpty ( $$session ) ]
                                                                                                                    • #close existing one
                                                                                                                    • Set Variable [ $r; Value:MBS("Translation.Release"; $$session) ]
                                                                                                                    • Set Variable [ $$session; Value:"" ]
                                                                                                                    • Set Variable [ $$Languages; Value:"" ]
                                                                                                                    • End If
                                                                                                                    • Set Variable [ $status; Value:MBS( "Translation.Status"; Translation::From Language; Translation::To Language) ]
                                                                                                                    • If [ $status = "installed" ]
                                                                                                                    • #okay
                                                                                                                    • Else If [ $status = "supported" ]
                                                                                                                    • Show Custom Dialog [ Title: "Languages not installed."; Message: "Please install the lanuguages in system preferences."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                    • Set Variable [ $r; Value:MBS("ShowURL"; "x-apple.systempreferences:com.apple.Localization") ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • #also okay
                                                                                                                    • Else If [ $status = "unsupported" ]
                                                                                                                    • Show Custom Dialog [ Title: "This language combination is not supported."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • Else [ ]
                                                                                                                    • Show Custom Dialog [ Title: "Translation is not available for these languages."; Message: $status; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • End If
                                                                                                                    • Set Variable [ $r; Value:MBS( "Translation.StartSession"; Translation::From Language; Translation::To Language) ]
                                                                                                                    • If [ MBS("IsError") ]
                                                                                                                    • Show Custom Dialog [ Title: "Failed to start session."; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • Else [ ]
                                                                                                                    • Set Variable [ $$session; Value:$r ]
                                                                                                                    • Set Variable [ $$languages; Value:$languages ]
                                                                                                                    • End If
                                                                                                                    • End If
                                                                                                                    • If [ not IsEmpty ( $$session ) ]
                                                                                                                    • Set Variable [ $r; Value:MBS("Translation.TranslateString"; $$session; Translation::Input) ]
                                                                                                                    • If [ MBS("IsError") ]
                                                                                                                    • Show Custom Dialog [ Title: "Sorry, but translation failed."; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • Else [ ]
                                                                                                                    • Set Field [ Translation::Output; $r ]
                                                                                                                    • End If
                                                                                                                    • End If
                                                                                                                    • #leave session open for next time
                                                                                                                    Fields used in this script
                                                                                                                    Scripts used in this script
                                                                                                                      Layouts used in this script
                                                                                                                        Tables used in this script
                                                                                                                        Table occurrences used by this script
                                                                                                                        Custom Functions used by this script
                                                                                                                          Custom menu set used by this script

                                                                                                                            Download example: Translation

                                                                                                                            Used functions: