不同语言的资产
Assets with different languages
我知道 res/values-ISOCode
目录中可以有不同的语言。 assets
目录中的 xml 文件也可以这样吗?文件夹结构看起来如何?
Is this possible for xml files in the assets directory as well?
是也不是。
是的,您可以将任何文件放入 assets/
,使用任何语言。
否,因为 Android 不会根据语言自动加载特定资产。你必须自己做(例如,通过 Locale
查找语言,然后根据该语言生成正确的目录名称)。 Android 仅根据资源而非资产的配置从不同目录加载内容。
How would the folder structure have to look?
无论您的基于语言的生成目录名称算法需要什么。
我知道 res/values-ISOCode
目录中可以有不同的语言。 assets
目录中的 xml 文件也可以这样吗?文件夹结构看起来如何?
Is this possible for xml files in the assets directory as well?
是也不是。
是的,您可以将任何文件放入 assets/
,使用任何语言。
否,因为 Android 不会根据语言自动加载特定资产。你必须自己做(例如,通过 Locale
查找语言,然后根据该语言生成正确的目录名称)。 Android 仅根据资源而非资产的配置从不同目录加载内容。
How would the folder structure have to look?
无论您的基于语言的生成目录名称算法需要什么。