{"id":13529489,"url":"https://github.com/pmarincak/gms2-mofile","last_synced_at":"2026-01-17T05:30:25.459Z","repository":{"id":53894781,"uuid":"521829095","full_name":"pmarincak/gms2-mofile","owner":"pmarincak","description":"MoFile loader for GameMaker Studio","archived":false,"fork":false,"pushed_at":"2023-12-28T18:36:20.000Z","size":273,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-02T16:34:57.676Z","etag":null,"topics":["game-development","gamemaker","gamemaker-language","gamemaker-studio-2","gml","localization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmarincak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-06T02:45:13.000Z","updated_at":"2024-07-03T10:28:14.000Z","dependencies_parsed_at":"2024-02-27T23:01:58.572Z","dependency_job_id":null,"html_url":"https://github.com/pmarincak/gms2-mofile","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarincak%2Fgms2-mofile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarincak%2Fgms2-mofile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarincak%2Fgms2-mofile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarincak%2Fgms2-mofile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmarincak","download_url":"https://codeload.github.com/pmarincak/gms2-mofile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246670544,"owners_count":20815003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","gamemaker","gamemaker-language","gamemaker-studio-2","gml","localization"],"created_at":"2024-08-01T07:00:36.793Z","updated_at":"2026-01-17T05:30:25.413Z","avatar_url":"https://github.com/pmarincak.png","language":"C++","funding_links":[],"categories":["Localization"],"sub_categories":["Recommendations"],"readme":"\n# gms2-mofile\nMoFile loader for Gamemaker Studio 2.3+\n\n## Table of Contents\n\n 1. [Requirements](#requirements)\n 2. [Download](#download)\n 3. [Maintainers \u0026 Contribution](#maintainers--contribution)\n 4. [Samples](#samples)\n 5. [Setup](#setup)\n 6. [Configuration](#configuration)\n 7. [Pulling Translation Strings From Code](#pulling-translation-strings-from-code)\n 8. [API](#api)\n\n## Requirements\n\n|Release Version| Gamemaker Version |\n|--|--|\n| 1.0.x | v2.3.0.x+ |\n| 1.1.x | v2022.09.x.y+ |\n\n## Download\n\n 1. Download the [exported local package](https://github.com/pmarincak/gms2-mofile/blob/main/export/com.package.gmlmofile.yymps)\n 2. Select Tools \u003e Import Local Package\n 3. Navigate to the saved package and select import\n 4. Import all resources\n\n## Maintainers \u0026 Contribution\nThis package is maintained by [Paige Marincak](https://twitter.com/paigemarincak/). To contribute, please fork the repo and make pull requests.\n\n## Samples\nSamples can be viewed [here](https://github.com/pmarincak/gms2-mofile/tree/main/samples).\n\n## Setup\n### PoEdit Files\n1. Create a folder in your datafiles called **TranslationFiles**. \n2. Copy the [sample.po and sample.mo](https://github.com/pmarincak/gms2-mofile/tree/main/samples/BasicSample/BasicSample/datafiles/TranslationFiles) files from the sample to the new folder.\n\n### GML\n1. Add **MofileGameStart()** to the GameStart of an object that is created at the start of the game.\n2. Add  **MofileGameEnd()** to the GameEnd of an object that is destroyed at the end of the game.\n3. Load your mofile at any point after MofileGameStart using **MofileLoadLanguageFile(\"sample.mo\")**\n\n## Configuration\n\n### GML\n|Variable Name| Default Value | Description |\n|--|--|--|\n| MOFILE_INCLUDED_FILES_SUBDIRECTORY | \"TranslationFiles\" | Path to datafiles subdirectory where the mofiles are stored at runtime.\n| MOFILE_USE_WORKING_DIRECTORY| true | Whether to preface MOFILE_INCLUDED_FILES_SUBDIRECTORY  with the [working_directory](https://manual.yoyogames.com/GameMaker_Language/GML_Reference/File_Handling/File_Directories/working_directory.htm) or not.\n\n### Translation Functions\nIf you would like to rename **_** or **_MofileMarkTranslation**:\n\n 1. Rename the functions as preferred in the code. Example: **TL** and **TL_Marker**.\n 2. Open your Po File. (i.e. sample.po) Recommend using [PoEdit](https://poedit.net/).\n 3. Translation \u003e Properties \u003e Sources keywords\n 4. Change \"_\" to \"TL\" and \"_MofileMarkTranslation\" to \"TL_Marker\"\n 5. Press Ok.\n \n### PoEdit\nIf you would like to use [PoEdit](https://poedit.net/) to pull translation strings from your code, you will need to create a custom extractor as follows:\n\n 1. Open PoEdit.\n 2. File \u003e Preferences \u003e Extractors\n 3. Click the + at the bottom.\n 4. Create the Extractor with the following configuration and click OK:\n\n|Name|Value|\n|--|--|\n| Language | GML\n| Extensions | *.gml\n| Extraction Command | xgettext --language=C --add-comments=TRANSLATORS: --force-po -o %o %C %K %F\n| Keywords List | -k%k\n| Input File List | %f\n| Charset | --from-code=%c\n\n## Pulling Translation Strings From Code\n\n 1. Open your Po File. (i.e. sample.po) Recommend using [PoEdit](https://poedit.net/).\n 2. Press **Update From Code**\n 3. New strings added and removed will be visible\n 4. Save to generate a new MoFile.\n\n## API\n### MofileGameStart\nSets up the linkage between GML and the MoFile DLL. Should be called once at GameStart.\n\n### MofileGameEnd\nFrees the MoFile DLL. Should be called once at GameEnd.\n\n### _\nMarks the provided value as a translatable string and returns the translation from the loaded MoFile. Feel free to rename this function to whatever shorthand makes the most sense. Be aware that you will need to update PoEdit grep configurations.\n\n    @param {String} value\n\n### _MofileMarkTranslation\nMarks the provided value as a translatable string and returns the original value. Feel free to rename this function to whatever shorthand makes the most sense. Be aware that you will need to update PoEdit grep configurations.\n\n    @param {String} value\n\n### MofileLoadLanguageFile\nLoads the localization file represented by the provided filename and returns whether it was successful or not.\n\n    @param {String} filename\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarincak%2Fgms2-mofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmarincak%2Fgms2-mofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarincak%2Fgms2-mofile/lists"}