2012-01-16 77 views

回答

4

你需要做的是在res文件夾中創建新文件夾。

例子:如果你需要支持添加到西班牙和意大利,你需要做的是這樣的:

  1. res文件夾

    1.1值

    1.2值-ES //西班牙語

    1.3的值,它//意大利

之後,您需要在values-esvalues-it中創建string.xml文件。而在所有的文件,你只需要創建要使用這樣所有的字符串:

<string name="title">Title</string> // in values folder 
<string name="title">Title in Spanish</string> // in values-es folder 
and etc. 

之後,你可以使用這些字符串:

TextView text = (TextView) findViewById(R.id.textView); 
text.setText(getString(R.string.title)); 

這應該工作。