デフォルトで、Lock v2 for iOSは英語のテキストを表示します。テキストを別の言語で表示したい、または、アプリケーションのテキスト値を変えたい場合には、Lock.stringsファイルを提供して、Lockが表示するかもしれない各種のテキスト項目に使用する値を定義することができます。言語の扱い方については、Appleのドキュメンテーションにある国際化とローカリゼーション
ここで、以下のように、Lock.stringsにあるいくつかの用語を代替のテキストで更新します。// Forgot password "com.auth0.lock.database.button.forgot_password" = "Did you forget your password?"; // tos & privacy "com.auth0.lock.database.button.tos" = "Signing up is an indication of your agreement to our terms of\n service and privacy policy";
用語によってはパラメーターを伴うため、翻訳する際にはそれらの配置を考慮することが重要です。特に、以下のように、複数のパラメーターがある用語には注意してください。// No more than %@{count} identical characters in a row (such as, \"%@{identical sample}\" not allowed) "com.auth0.lock.error.password.no_more_identical" = "No more than %1$d identical characters in a row (such as, \"%2$@\" not allowed)";