Hello I am trying to make application in different language like French and English.

Suppose there is registration activity where there are two fields like First Name, Last Name then I can display the First Name, Last Name text in English/French. Here in my application there is option to change application language, from there user has changed to French now user started to type email then here I want in French instead of English.

can you please look how I can do such that keyboard should have now French ?

Suppose user has typed details in French here and later user has changed the language of application to English then I need to show the First Name, Last Name in English now which was typed in French. So should I translate French dynamic words to English or any good idea resolve this situation ?

Thanks in advance

有帮助吗?

解决方案

From what I understand, you want the users first name and last name to be automatically translated from French to English (does that even make sense?), which is not possible right now, as it requires strong AI.

If you just want the messages "First Name" / "Last Name" to appear either in French or English, have you read the introduction on languages and resources howto?

Keep in mind that your program does not need to change the keyboard - that is the users preference (and I would be quite annoyed if a program would take such initiatives...).

其他提示

There is no standard way to tell the user's keyboard what language to use, unless you implement your own keyboard. Since you are entering names and emails, you can probably get by with a simple keyboard without word suggestions or corrections, which would allow you to use a simple KeyboardView and prevent the usual keyboard from appearing using your Activity's windowSoftInputMode.

For the translation, I think your best option would be to try to use an online translator API. Still, I think I agree with the other replies in saying that you should try to work out a more realistic design with your clients.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top