본문으로 건너뛰기
ZokoGames

로그인

이 페이지는 아직 번역되지 않아 영어로 표시됩니다.

Localisation guide

이 페이지의 내용

Localisation guide

English is required for every visible string. Extra languages are welcome and help the game reach more players, but they never replace English. This guide covers the technical side.

Pick the language#

SDK.user.systemInfo.locale is a BCP 47 tag such as "en-US", "pt-BR" or "de". countryCode is an ISO country code such as "BR".

const SUPPORTED = ["en", "es", "pt", "de", "fr"];

function pickLanguage() {
  const raw = SDK.environment !== "disabled" ? SDK.user.systemInfo.locale : navigator.language;
  const base = String(raw).toLowerCase().split("-")[0];
  return SUPPORTED.includes(base) ? base : "en";
}

Rules:

  • Decide the language automatically. Do not make players choose before they can play. A small language switch in settings is fine.
  • Always fall back to English, for the whole game and for any single missing string.
  • In local mode the locale comes from your browser's language and the country is always "US". Change the browser language to test, or force a language with your own query parameter.
  • The Preview tool shows what the portal reports to the game.

Keep strings out of code#

const STRINGS = {
  en: { play: "Play", gameOver: "Game over", score: "Score: {n}" },
  es: { play: "Jugar", gameOver: "Fin del juego", score: "Puntos: {n}" },
};

function t(key, vars = {}) {
  const table = STRINGS[lang] ?? STRINGS.en;
  const raw = table[key] ?? STRINGS.en[key] ?? key;
  return raw.replace(/\{(\w+)\}/g, (_, k) => String(vars[k] ?? ""));
}
  • Use named placeholders ({n}), never string concatenation. Word order differs between languages.
  • Use Intl.NumberFormat(locale) and Intl.DateTimeFormat(locale) for numbers and dates.
  • Use Intl.PluralRules(locale) for plurals; many languages have more than two forms.
  • Load only the language you need, so translations do not grow the initial download.

Layout and fonts#

  • Text expands: German and Finnish are often 30 percent longer than English. Size buttons from their content and test with the longest language.
  • Right-to-left languages (Arabic, Hebrew) need mirrored layout and dir="rtl". Only ship them when you have tested them.
  • Pick a font that covers your scripts. A pixel font with only Latin glyphs shows empty boxes for Cyrillic or CJK. Subset fonts to keep them small.
  • Do not bake text into images. Put it in a text layer so it can be translated.

Engines#

  • Unity: the Localization package or your own table; read the locale from the wrapper's system info before the first scene loads.
  • Godot: TranslationServer.set_locale() with the SDK locale.
  • Construct 3: a language object or the Localization plugin.
  • Phaser and library games: your own table as above.

See the engine pages for how each wrapper exposes systemInfo.

Listing text#

The title, descriptions and controls you enter in the console are in English. Make sure the in-game controls text matches the description. Other languages inside the game do not need separate listing text.

Checklist#

  • Every visible string, including errors and the tutorial, exists in English.
  • Language is chosen from systemInfo.locale with an English fallback.
  • Longest translation still fits every button.
  • Fonts contain the glyphs for each shipped language.
  • No language prompt blocks the first play.

이 페이지에 불분명하거나, 틀리거나, 빠진 내용이 있나요? 지원팀에 알려 주세요 · 미리보기 도구에서 게임 테스트하기

쿠키 설정

ZokoGames가 사용할 수 있는 쿠키를 선택하세요. 필수 쿠키는 사이트가 작동하는 데 꼭 필요해서 항상 켜져 있어요.

  • 로그인, 언어, 그리고 이 선택 사항에 사용돼요. 항상 켜져 있어요.

  • 최근 플레이한 게임 같은 정보를 이 기기에 기억해요.

  • 무작위 방문자 ID로 플레이 횟수와 페이지 방문을 집계해 서비스 개선에 활용해요.

  • 맞춤 광고를 허용해요. 광고는 무료 게임 운영에 쓰여요.