In order for strings to be localized,
it helps to move all
strings into strings.xml.
Any string that is hard
coded cannot be translated
without modifying the compiled code.
In the strings.xml file, you
will want to comment thoroughly in order
to provide the context for the string.
This will result in higher
quality translations.
You may want to include information
such as, what is this string for,
when is it presented to the user,
where is this in the layout?
For example, translations are less
flexible for a button than a text box.
You can also specify strings that
should not be translated simply with
a placeholder tag.
Finally, there are a variety of system
provided formats for dates, times,
numbers, and currencies.
So take advantage of our
utils such as date format for
dates, decimal format and string
format for numbers and currency, and
phone number utils for phone numbers to
simplify formatting across your locals.
،من أجل ترجمة السلاسل
إنه يساعد في نقل كل
.السلاسل إلى strings.xml
يتعذر ترجمة
أية سلسلة تم ترميزها ترميزًا ثابتًا
.دون تعديل التعليمات البرمجية المجمعة
في ملف strings.xml، سيلزم
كتابة تعليق جيدًا من أجل
.توفير السياق الخاص بالسلسلة
وينتج عن هذا
.توفير ترجمات بجودة أعلى
قد تريدون تضمين معلومات
،مثل، الهدف من هذه السلسلة
،متى يتم تقديمها للمستخدم
أين توجد في التخطيط؟
على سبيل المثال، الترجمات تكون أقل
.مرونة للزر عن مربع النص
يمكنكم أيضًا تعيين سلاسل
لا يجب ترجمتها باستخدام
.علامة عنصر نائب
وفي النهاية، توجد مجموعة متنوعة من
التنسيقات المتوفرة بالنظام للتواريخ والوقت
.والأرقام والعملات
لذا، استفيدوا من
الأدوات المساعدة مثل تنسيق التاريخ
للتواريخ والتنسيق العشري وتنسيق
السلسلة للأرقام والعملة و
الأدوات المساعدة لرقم الهاتف مع الأرقام الهاتفية
.لتبسيط التنسيقات في كافة القيم المحلية
Para que strings sejam localizadas,
isto ajuda a mover todas as
strings para strings.xml.
Uma string
codificada não pode ser traduzida
sem modificar o código compilado.
No arquivo strings.xml,
comente detalhadamente para
fornecer o contexto da string.
Isso vai gerar traduções de
melhor qualidade.
Inclua informações
como, para que esta string serve,
quando ela é apresentada ao usuário,
onde ela está neste layout?
As traduções são menos
flexíveis para um botão que para uma caixa de texto.
Defina também strings que
não devem ser traduzidas só com
uma tag de espaço reservado.
Por fim, há vários formatos fornecidos pelo
sistema para datas, horas,
números e moedas.
Por isso, aproveite os utilitários
como formato de data para
datas, formato decimal e de string
para números e moeda, e
de números telefônicos para
simplificar a formatação nos locais.
为了对字符串进行本地化,
它可帮助将所有字符串
移到 strings.xml 中。
如果不对编译的代码进行修改,
任何硬编码的字符串
均无法翻译。
在 strings.xml 文件中,
为了给字符串提供上下文,
您会想加上全面的注释。
这会有助于
提高翻译质量。
其中可以包括如下信息,
例如,该字符串的目的、
何时向用户呈现以及
它在布局中位于何处。
例如,按钮的翻译
就不如文本框灵活。
也可以通过占位符
标签来指定不能被翻译的
字符串。
最后,
系统可提供多种日期、时间、
数字和货币格式。
利用好我们的日期格式、
小数点格式、
数字和货币的字符串格式等工具,
以及适用于电话号码的电话号码工具等
来简化位置
的格式化。