DainWs / Crazy-Random-Multiverse

The game is a strategic showdown in which each player receives a random leader card, which is displayed publicly. The objective is to eliminate the enemy leaders before they eliminate yours.
1 stars 0 forks source link

Feature: Text translation system #19

Open DainWs opened 3 weeks ago

DainWs commented 3 weeks ago

To ensure consistent language display across all players in the game, the server should handle language selection for card information before sending data to the client. When the server retrieves a card, it should automatically select the text based on the client’s preferred language, which is stored with other settings in the localStorage. This way, each player sees the card’s name, description, and other text in their chosen language without extra requests or data processing on the client side.

Acceptance Criteria:

  1. Client Language Preference: The server knows each client’s selected language, stored at session level.
  2. Dynamic Language Retrieval: For each card request, the server fetches the data with text translated to the client’s preferred language.
  3. Single Data Packet: The server sends only the translated card data (name, description) without including other languages.
  4. No Client-Side Processing: The client receives fully translated card data, ready for display.
DainWs commented 3 weeks ago

This issue was created to perform the refactor #11