Closed dingo-d closed 9 years ago
Something like this falls under premium support.
Oh, ok. Sad that there isn't a bit of documentation on this. I get the other feilds, like taxonomy, but I'm lost at admin-texts.
If someone wants to write some documentation. We just don't know wpml. This is open source after all. :)
I think I got it, at least when redux is concerned. It' should be like this:
<wpml-config>
<admin-texts>
<key name="opt_name">
<key name="id#1" /> <- every id from any kind of input field
....
</key>
</admin-texts>
</wpml-config>
Then in String Translation in admin_texts field will be strings like [opt_name]id#1 that you'll be able to translate.
So that works globally? What about translating the rest of the admin panel?
Well the thing is that this .xml is kinda confusing to me xD
On one hand String translation in wpml will scan all the translatable strings (and you'll see every line from your redux options, as well as from redux core files - those with 'redux-framework' domain), so I'm still not 100% sure why I need that file.
I read that it's used for traslating text that is in wp_options table in your database, but no details are provided so I'm kinda working by experimenting what could work, and what doesn't work.
If you don't have String translation, you need to use .po/.mo files, and my redux options are all translatable, so again I'm super confused what to do with .xml file.
WPML confuses me. That's why we just do our own translations via the community: https://www.transifex.com/projects/p/redux-framework/
Though I want to give users the OPTION to have those strings be locally translatable. So anything you can find for us will help the community. I just don't have the time to learn WPML right now.
Hey guys, This question isn't Redux Framework related. To translate "dynamic" text (inputs, textareas etc.) within Redux or any other options frameworks (in footer.php as example):
// Register new translatable string that you are able to see on "String Translation" screen then if ( function_exists( 'icl_register_string' ) ) icl_register_string( __( 'Footer Text', 'your_theme_textdomain' ), '', $redux_demo[ 'footer_text'] ); // Output _e( function_exists( 'icl_t' ) ? icl_t( __( 'Footer Text', 'your_theme_textdomain' ), '', $redux_demo[ 'footer_text'] ) : $redux_demo[ 'footer_text'] );
I hope this will help others too. More info you can find by following the link I've posted above.
So I should go through my theme and wrap every string in this? O.o
Hi, Everything? You must reconsider your theme's structure. Use meta boxes, custom post types etc. for any content. Theme Options panel isn't for that.
Well we're using meta boxes (team I'm working for), custom post types etc. Theme Options is just for, well, theme options :D Colors, menu positions, some strings like address, links to social sites etc.
Even in my theme options I put translatable strings like this: __('Colors', 'myTheme'). And wpml is picking that up.
But my issue is what if someone wants to put different input values for different sites (like address that you can put in header, and you want for English site to be an English address, and for French, French address). That sort of things. That's why I started putting those in .xml file.
I've been told that in my .xlm file should be only those things that are wrapped in get_option() function. So I looked at my wp_options table, and found translatable strings there and included them.
I fully understand what you're trying to achieve so why I share that code. I've came across all of this. You can even create foreach loop to parse your values through WPML icl_register_string and icl_t functions. That's how I see it.
Hi!
I found several topics about implementing wpml-config.xml for redux, and some things are just not clear to me.
For example
< wpml-config > < admin-texts > < key name="redux_demo" > < key name="top_header_text" /> < key name="header_opening_hours" /> < key name="header_contact_number" />The first key name= is where my opt_name goes, that's understood, but what are other key names inside? My id's in the arrays? What if I have input field, and input is different in two languages, how to mark that in my .xml file?
Any help is appreciated.
EDIT: I cannot get the tags to appear in code again, tried with < html > and < pre >, nothing works frustrated