ElkArte Community

Elk Development => Theme development => Topic started by: CrimeS on September 03, 2014, 10:45:38 am

Title: Language folders
Post by: CrimeS on September 03, 2014, 10:45:38 am
Hello! Are there any language folders like in SMF? I liked the way you could put different images like in a SMFflat theme's menu, so if you're using different language forums it automatically changes the images that it's using. Or like with the NEW icons in SMF that were in folders like images/english-utf8 and images/polish-utf8 and so on.

Hopefully I explained it clear enough.
Title: Re: Language folders
Post by: Adrek on September 03, 2014, 10:55:55 am
I don't know if $user_info it is always set, but if it is you could use $user_info['language'].
And then just add language name in file name.
Title: Re: Language folders
Post by: emanuele on September 03, 2014, 11:21:24 am
In SMF there was nothing "centralized" to do that, it was just pointing to the "right place" done in the template:
Code: [Select]
$settings['images_url'] . '/' . $context['user']['language'] . '/new.gif"
You can definitely do the same in Elk.

That said, in general, use images for strings to localize is not the best option, for one it requires much more efforts to localize them.
Title: Re: Language folders
Post by: CrimeS on September 03, 2014, 12:58:03 pm
I see, the best option looks to be switching it in "Current theme" tab.