Community Translation (Co-creation)
Overview
SDK 1.4.0+ introduces the Community Translation feature, allowing end-users (players) to submit translation suggestions for in-app text. Unlike AI Agent review, community translation is a card-based suggestion submission flow without AI dialogue.
Prerequisites
Before using the community translation feature, the following conditions must be met:
- SDK has been initialized
userIdhas been set viaupdateUserInfo()(to identify the player submitting suggestions)
java
UserConfig userConfig = new UserConfig.Builder()
.setUserId("player_001")
.setUserTags("beta,community")
.build();
LoxilyLocalize.updateUserInfo(userConfig);Option 1: Auto Screenshot
The SDK automatically captures the current screen and submits it with the suggestion:
java
String[] stringIds = {"dialog.npc_greeting", "dialog.player_choice_1"};
LoxilyLocalize.suggestTranslation(stringIds);Option 2: External Screenshot (recommended for game engines)
For Unity, Cocos2dx, and other game engines where the game captures its own screenshot:
java
byte[] screenshotBytes = ...; // From RenderTexture
String[] stringIds = {"dialog.npc_greeting", "dialog.player_choice_1"};
LoxilyLocalize.suggestTranslation(stringIds, screenshotBytes);Note: When
imageBytesisnull, the SDK will automatically capture the current screen.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| stringIds | String[] | Yes | Array of string_ids used on the current page, must not be empty |
| imageBytes | byte[] | No | PNG/JPEG screenshot data; pass null for auto-capture |
Workflow
- Call method → Pass the string_id array for the current page
- Display cards → SDK opens the co-creation UI, showing the current translation for each string_id
- Player suggests → Player selects entries to modify and inputs translation suggestions
- Submit → Suggestions are submitted to the backend along with the screenshot, for the translation team to review
Comparison with reviewCurrentScreen
| Aspect | reviewCurrentScreen | suggestTranslation |
|---|---|---|
| Target users | Development/translation team | End-users (players) |
| Interaction | AI Agent dialogue | Card-based suggestion form |
| Features | AI analysis + one-click optimization + version publishing | Player submits translation suggestions |
| userId | Not required | Required |