I would like to know if there is any good idea how to switch layouts according to application language selected – e.g. switch between left-to-right layout and right-to-left layout. Have different images or written text and ofcourse the position.
I thought doing it using a private member in the application that indicates the current language selected. According to this parameter I can choose the related XML and text etc.
Actualy I might create some LayoutFactory class, although I don’t really think it is required.
But will have to create the realted layout XMLs.
Is there any option to put subdirectories under he layout?
Or should I name the files like en_.xml and he_.xml etc?
For
valuesanddrawableyou can add folders likevalues-frfor French orvalues-jafor Japanese. The-frindicates that if your phone is set to French localization the app will use any folder that has the-fradded to its name. I’m guessing this goes for thelayoutfolder aswell.You can read about Localization here .