0

According to this thread, in order to make Hebrew available on all devices, I need to maintain two similar files of each resource type, one in values-iw and another in values-he. Having a ready-to-use strings.xml, I was wondering if there's a way to "link" the files in one of these folders to the files in the second folder instead of making an alias for each string (exampled here).

Thanks!

Community
  • 1
  • 1
Neria Nachum
  • 1,519
  • 1
  • 20
  • 37
  • Delete one of the two files. Edit the other one. Copy-paste it. Rename the newly pasted file as the one you deleted. Done. – Phantômaxx Nov 06 '16 at 16:04
  • @Rotwang I'm aware of this option as well. I wonder if there's a way to link one to another, so I wouldn't have to deal with it every time I modify a string. – Neria Nachum Nov 06 '16 at 16:06
  • As per the [official docs](https://developer.android.com/guide/topics/resources/string-resource.html): `A single string that can be referenced from the application or from other resource files (such as an XML layout).` It **seems** promising... ;) – Phantômaxx Nov 06 '16 at 16:13
  • Why to you need to link them? Don't all string values get compiled into a the R.java file and are accessible by `R.string`? – OneCricketeer Nov 06 '16 at 16:13
  • @cricket_007 In order not to edit the files twice. As both `_iw` and `_he` are needed for Hebraic, if you want to support older devices. – Phantômaxx Nov 06 '16 at 16:14
  • @Rotwang This is pretty much similar to the example I attached - making each string link to its corresponding string in the other file. It prevents me from modifying both files on any change, but still requires extra work upon adding (or removing) a string. – Neria Nachum Nov 06 '16 at 16:18
  • @NeriaNachum I unfortunately don't know any other way. – Phantômaxx Nov 06 '16 at 16:21

0 Answers0