Please Check the screenshot....There is added checkout cities field in function.php file. we need to translate the cities filed Arabic too. how can i make it ?
so the visitor for Arabic will see in Arabic cities name
Sorry I didn't get it,,
Can you explain a bit more ? Here is full code of function.php file of which needs to translate it Arabic version too..Only the cities name. ...Note that, English is default, Secondary are french and Arabic
And this is from Child themes' function.php file
/**
* Change the checkout city field to a dropdown field.
*/
function ace_change_city_to_dropdown( $fields ) {
Here is a small example (note the __() functions):
/**
* Change the checkout city field to a dropdown field.
*/
function ace_change_city_to_dropdown( $fields ) {
$cities = array(
__( 'Adrar', 'your-domain' ),
__( 'Chlef', 'your-domain' ),
...
In WPML > Theme and plugins localization, you can scan your plugin or theme (where this code is) and then translate them using String Translation.
Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.