Localisation (MSFS)

From FSDeveloper Wiki
Jump to navigationJump to search


You can set up text as a variable that can change depending on the application language of the user. Working with localisation files means text can be changed more easily as well as translated into other languages.

Usage

You can reference the strings by typing TT:nameofthestring instead of the text (case sensitive):

[Main]
Title=TT:TellurideLanding.Title
Description=TT:TellurideLanding.Description
AppVersion=10.0.1
FlightVersion=1
MissionType=LandingChallenge
MissionSubType=Famous

You use it for example in the .FLT and the mission script.

A drawback is that if a user uses a language that you didn't include, they will not see it english, but just see the name of the string.

Creating and Editing a Localisation File

Manual editing

For this you have to create a new file next to the .FLT. This file has the same name as the other files, and the extension .loc . This file uses a JSON structure (you can use this tool to check if the structure is correct):

{
  "LocalisationFile": {
    "Version": 1,
    "UUID": "00af5170-b390-4f9a-bdff-11660d6b8cbc",
    "Languages": [
      "en-US"
    ],
    "Strings": {
      "TellurideLanding.Title": {
        "UUID": "dd927cba-4905-4b78-a77f-55087503839a",
        "Comment": "Activity title",
        "LastModifiedBy": "Mr_LiamT",
        "LastModifiedDate": "021-07-03 20:35:49",
        "Languages": {
          "en-US": {
            "Text": "FSX Mission: Telluride Landing"
          }
        }
      },
      "TellurideLanding.Description": {
        "UUID": "21a963ad-bc6a-4325-8235-c6e4cdd947cc",
        "Comment": "Activity description",
        "LastModifiedBy": "Mr_LiamT",
        "LastModifiedDate": "2021-07-03 20:35:49",
        "Languages": {
          "en-US": {
            "Text": "Telluride, USA"
          }
        }
      }
    }
  }
}

The first part has a GUID that you have to generate randomly and a list of the languages. The next part has all the strings. First is the name of the string, then another random GUID, a short description, last changes, and finally the strings for the different languages.

During compiling of the project, conflicts for duplicate GUID's will be checked, but not conflicts for duplicate string names. Due to this, it may be needed to specify the package when using a string: @package-name,TT:STRING.NAME instead of just TT:STRING.NAME.

MSFSLocalizer

You can use this tool to edit localisation files a lot easier than manually editing the .xml file. You can easily add new strings and languages and automatically generate a GUID and last modified date for every string.


Pages relevant to mission creation for MSFS.

Mission structure

Flightplan
Weather definitions
Flight file
Mission script
Triggers
AirportLandingTrigger & AreaLandingTrigger · CounterTrigger · PropertyTrigger · ProximityTrigger · TimerTrigger
Actions
ObjectActivationAction · DialogAction · AdjustPayloadAction · ChangeAssistanceItemAction · FadeToColorAction · RandomAction · RequestTeleportAction · CountAction · ResetTimerAction · TimerAdjustAction · GoalResolutionAction & SubGoalResolutionAction · GrantRewardAction · PointOfInterestActivationAction · ActivateWaypointsAction · AITakeControlsAction · SendMessageToAIAction
Mission objects
Mission definition · Goal · LivingWorldExclusion · Camera
Calculator
Flow states
Events
Areas
Rectangle Area · Cylinder Area · Polygon Area · Corridor Area · InGameMarker
Library objects
Sim objects
RTC

Mission tools

MSFS Script Editor · BushTripInjector · BushMissionGen · MSFSLocalizer · SPB2XML · Little Navmap

Other

Example mission files
Porting FSX Missions to MSFS
Localisation
Click the links to access the topic pages (Default - Opens in same window).