4 ms·
Ask HN: How to Translate Your App?
Hi, I have a SaaS software that needs to be translated in +5 languages. Do you have experience in building and maintaining translation files?
We don't know if in 2024 we need to keep the translation in the source code, use translation software(like Weglot), or build something custom.
What's your experience?
- david_allison 2y agoDon't go custom unless you REALLY need it. There's a lot of ground to cover depending on the language, brief things to think about: * Right to Left languages need effort, as they redefine the UI * Longer languages (German) need thought/character limits * When defining user-visible lists, you need to decide whether the language defines the order, or the order is fixed * Does the start of the week matter? * Is your use of colors intuitive cross-culturally [Chinese stock market] * Is your use of flags offensive? [Windows doesn't have flag emoji for a reason] * Are you accepting CJK text? Be aware of Han Unification * Some languages don't have spaces, so splitting on " " would fail * Turkish i problem and .toUpper/toLower - when to use invariant locales * Fonts may not be able to display all your required characters * Translators need context when translating: try a mix of glossary, string description, or screenshots * Images need work if they're not SVG Familiarise yourself with CLDR tables/rules: https://www.unicode.org/cldr/charts/45/supplemental/language_plural_rules.html#rules https://www.unicode.org/cldr/charts/45/supplemental/language... Currently using CrowdIn's open source plan [100+ languages, 40+ reasonably translated], would STRONGLY recommend: [https://crowdin.com/project/ankidroid https://crowdin.com/project/ankidroid]. ==== As a process: * Find & setup a translation frontend library to use + define a translation function. For the following rough example, I'll assume React syntax + json * extract strings, plurals, images etc..: `<span>Hello World</span>` -> `<span>{t("home.greeting")}</span>` * Upload `en.json` to translation provider * Upload contextual information/screenshots/glossary * Find translators and track progress * Proofread if necessary * Either use a SDK for live translations, or download `[fr/de].json` and include them alongside `en.json` * Send app off for verification
- edweis 2y agoThank you for your reply, it is exactly what I am looking for. Fortunately we have some people here able to do the translation. We're looking at formatjs.io for the react librairy.
- david_allison 2y agoThanks for the nerd snipe! I'd strongly recommend against it. 1) They've incorrectly documented most of their plural rules, it's like they didn't bother to read the spec (and it's an easy spec to read). > one: This category is used for languages that have grammar specialized specifically for one item. Many languages, but not all, use this plural category. (Many popular Asian languages, such as Chinese and Japanese, do not use this category.) https://formatjs.io/docs/core-concepts/icu-syntax#plural-format https://formatjs.io/docs/core-concepts/icu-syntax#plural-for... > These categories are only mnemonics -- the names don't necessarily imply the exact contents of the category. > This is worth emphasizing: A common mistake is to think that "one" is only for only the number 1. Instead, "one" is a category for any number that behaves like 1. So in some languages, for example, one → numbers that end in "1" (like 1, 21, 151) but that don't end in 11 (like "11, 111, 10311). https://cldr.unicode.org/index/cldr-spec/plural-rules#h.ukir5vdcl36e https://cldr.unicode.org/index/cldr-spec/plural-rules#h.ukir... 2) That example is trivial. They've only bothered with 8 languages and most are uninteresting. 3) Using currency as the standard numerical example is correct, but questionable.
- edweis 2y agoYour definitely know your stuff ! For now as a POC we simply are using the t() function with a translation file. We'll see which features are important for us and we'll deep dive when needs be. Thank you for your insight, I understand that translation is hard :)