Skip to content

Community Translation / Text Quality Feedback

Overview

SDK 1.4.0+ introduces the Community Translation feature, allowing end-users (players) to submit translation suggestions for in-app text. Since 1.5.0 it has been extended into Text Quality Feedback: players can rate the current translation 1–5 stars and/or submit a suggested translation. Unlike AI Agent review (developer-side), this flow targets the end-user.

Two integration modes are available, both hitting the same backend pipeline (rating-only feedback is auto-approved into the per-string average; entries with a suggested translation go through AI scoring → human review):

  • Built-in UI — call suggestTranslation(stringIds[, imageBytes]) and the SDK renders its own rating card. Lowest integration cost.
  • Headless (no SDK UI, 1.6.0+) — call submitTranslationSuggestions(...) and submit ratings/suggestions you collected in your own UI. The SDK does not open any page.

The built-in UI flow is documented under Option 1/2; the headless flow is covered in Option 3.

Prerequisites

Before using the community translation feature, the following conditions must be met:

  1. SDK has been initialized
  2. userId has been set via updateUserInfo() (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);

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 imageBytes is null, the SDK will automatically capture the current screen.

Parameters

ParameterTypeRequiredDescription
stringIdsString[]YesArray of string_ids used on the current page, must not be empty
imageBytesbyte[]NoPNG/JPEG screenshot data; pass null for auto-capture

Option 3: Headless submit (no SDK UI, 1.6.0+)

If you want to keep your own UI style (e.g. an existing feedback dialog), use submitTranslationSuggestions(...) to submit ratings/suggestions you collected yourself. The SDK renders no page at all.

java
// 1) Build the items collected from your own UI
List<TranslationSuggestion> items = new ArrayList<>();
items.add(TranslationSuggestion.builder("HOME_TITLE")
        .rating(4)
        .build());
items.add(TranslationSuggestion.builder("BTN_OK")
        .rating(2)
        .suggestedTranslation("OK")
        .build());

// 2) Optional screenshot; pass null and nothing is attached
//    (unlike Option 1/2, the SDK does NOT auto-capture here)
byte[] screenshot = captureGameScreenBeforeOpeningDialog();

// 3) Submit; callback fires on the main thread
LoxilyLocalize.submitTranslationSuggestions(items, screenshot,
        new SuggestSubmitCallback() {
            @Override
            public void onSuccess(int ratingCount, int suggestionCount) {
                showToast("Thanks: " + (ratingCount + suggestionCount) + " entries submitted");
                dismissDialog();
            }

            @Override
            public void onFailure(String errorMsg) {
                showToast("Submit failed: " + errorMsg);
            }
        });

Single-entry overload:

java
LoxilyLocalize.submitTranslationSuggestions(
        TranslationSuggestion.builder("BTN_OK").rating(5).build(),
        /* imageBytes */ null,
        callback);

TranslationSuggestion

Built with a fluent builder:

FieldTypeRequiredDescription
stringIdStringYesThe string id (typically obtained from your getPageString call site)
ratingintNo1–5; 0 or unset means "no rating"
suggestedTranslationStringNoPlayer-written suggestion; empty/null means "no suggestion"
currentTranslationStringNoThe translation currently displayed. If omitted, the SDK auto-fills it by stringId — usually you can skip this.

Each item must satisfy either rating > 0 or a non-empty suggestedTranslation, otherwise it is silently filtered out.

SuggestSubmitCallback

java
public interface SuggestSubmitCallback {
    void onSuccess(int ratingCount, int suggestionCount);
    void onFailure(String errorMsg);
}
  • ratingCount — number of rating-only entries accepted by the server
  • suggestionCount — number of suggestion entries accepted (including those that also carry a rating)
  • onFailure — fires on SDK validation failure, network errors, or HTTP non-2xx

Parameters

ParameterTypeRequiredDescription
suggestionsList<TranslationSuggestion> / TranslationSuggestionYesAt least one item
imageBytesbyte[]NoPNG/JPEG screenshot. Passing null attaches no image — the SDK does NOT auto-capture in this mode.
callbackSuggestSubmitCallbackNoResult callback, fires on the main thread

Notes

  • submitTranslationSuggestions does not auto-capture a screenshot. If you want one, capture it before opening your own dialog, otherwise you'd capture the dialog itself.
  • Wire format and server-side dedup/anti-abuse are identical to suggestTranslation; only the entry point differs.
  • The same prerequisites apply (SDK initialized + userId set).

Migrating from the legacy API

Legacy APIReplacementNotes
evaluateString(code, content)suggestTranslation(new String[]{code}) or submitTranslationSuggestions(...)Signature preserved but @Deprecated; internally forwards to suggestTranslation. The content argument is ignored (the new platform always looks up the live translation).
evaluateAllStrings()@Deprecated, no-op (the "rate the whole release" dimension is not in the new platform).
enableEvaluateFunction(boolean)@Deprecated, no-op.

Existing integrations keep compiling, but please migrate to the APIs described on this page.

Built-in UI workflow

  1. Call method → Pass the string_id array for the current page
  2. Display cards → SDK opens the co-creation UI, showing the current translation, a 1–5 star rating and an optional suggestion input for each string_id
  3. Player feedback → Player gives a rating, a suggestion, or both (empty rows are skipped)
  4. Submit → Ratings are accepted immediately into the per-string average; suggestions enter the AI + human review queue; points are awarded per the project's configuration
  5. Close → On success the SDK toasts and dismisses itself

Comparison with reviewCurrentScreen

AspectreviewCurrentScreensuggestTranslationsubmitTranslationSuggestions
Target usersDevelopment/translation teamEnd-users (players)End-users (players)
InteractionAI Agent dialogueSDK-rendered rating cardYour own UI (SDK is headless)
FeaturesAI analysis + one-click optimization + version publishingPlayer rates / suggests translationSame, but UI is owned by the integrator
userIdNot requiredRequiredRequired
ScreenshotAlways attachedAuto-captured if suggestion present (not attached for rating-only)Never auto-captured; integrator decides
Available sinceSDK 1.2.8+SDK 1.4.0+SDK 1.6.0+