Using metasite translation strings in game

Game development with Board Game Arena Studio
Post Reply
User avatar
quietmint
Posts: 299
Joined: 31 July 2017, 00:28

Using metasite translation strings in game

Post by quietmint »

Is it possible to use metasite translations in my game, to avoid making people translate the same text again? I am using the following to get string from BGA main site and it works. The game shows the translated text (I tested with Danish language):

Code: Select all

      var resetCameraBlock = this.format_block('jstpl_resetCamera', {
        camera: _('Camera'),
        reset: __('lang_mainsite', 'Reset to default'),
      });
Screen Shot 2020-09-06 at 11.30.15.png
Screen Shot 2020-09-06 at 11.30.15.png (10.21 KiB) Viewed 432 times

However, BGA translation system incorrectly shows this as a string specifically for Santorini game. The community should not be asked to provide a translation here (it would not be used anyway).
Screen Shot 2020-09-06 at 11.28.11.png
Screen Shot 2020-09-06 at 11.28.11.png (31.98 KiB) Viewed 432 times
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: Using metasite translation strings in game

Post by Een »

TLDR: please don't do that :)

On principle this would be possible, and we could update the static translations extraction process to not take into account translatable strings inserted like you did. BUT this would create an adherence between the modules and the mainsite, and depending upon context it could lead to semantic issues (the same string in English can have widely distinct translations in other languages if the context is not exactly the same).

The overlap between the mainsite and the games being in general very small, the extra translation work is actually very small too, and we prefer to keep translations modular to keep things simple and avoid other complex issue appearing down the line.
Post Reply

Return to “Developers”