国際化に向けた取り組み

既にプロジェクトがあり、それを複数の言語に翻訳することを考えてますか?このガイドは役に立つはずです。特殊な例の説明もありますが、多くの例は一般的なものであり、他の状況にも応用できます。

ソフトウェアを翻訳する前に、世界中の言語が本当に異なっていることを理解し、自分の経験に基づいた推測を排除してください。ほとんどの言語では、翻訳された部分から文を連結しようとすると、おかしくなります。また、複数形を適切に処理することが必要です。これは、多くの言語には複雑な規則があり、最終的に使用する国際化フレームワークがこれに対応しているためです。

最後になりますが、翻訳される文字列に何らかのコンテキストを追加しなければならない場合があります。翻訳者が Sun という文字列を翻訳するとします。文脈がわからなければ、ほとんどの人は太陽と解釈しますが、実際には日曜日の省略形として使われるかもしれません。

国際化フレームワークの選択

プラットフォームで標準となるものを選択し、現地語化を処理する独自のフレームワークを作成して、車輪の再発明を避けてください。Weblate は、広く使用されているフレームワークのほとんどに対応していますが、詳細については、現地語化ファイル フォーマット を確認してください(特に 翻訳の種類別の機能)。

下記の表は、各プラットフォームごとに、推奨するファイル形式です。推奨は経験に基づいていますが、すべての使用例を網羅することはできないので、選択をする場合は常に実際に使用する環境を考慮してください。

一部のファイル形式のより詳細なワークフローは以下の章で説明します。

Educating developers for proper internationalization

Software internationalization is not just about being able to translate strings but about making the whole software look native to a user from another country. This also includes things like date or number formatting, currency display, or inputting text in the right direction. Most software frameworks have good support for this, so please follow their instructions for all these areas.

The string translation might not be a straightforward task as well. This is especially true for short strings like captions or button labels. Different languages have different rules, and it is not reasonable to expect that the same string will always be translated the same. In many situations it also might not be clear how to translate, and it is even challenging to distinguish whether the word is a verb or a noun.

All developers should understand this and uniquely identify strings used in different scopes. For example, None meaning "no users" might be translated differently from None meaning "no items". Use different keys or contexts to distinguish these terms for translators. You can provide additional context in Weblate, such as 文字列の視覚情報 or 解説.

参考