Coder Social home page Coder Social logo

Comments (15)

theprodev avatar theprodev commented on May 24, 2024

Hey, I can provide you an update including Saudi Arabia. Do you have a list of cities and regions in Saudia ready?

from woocommerce_states_places.

YordanSoares avatar YordanSoares commented on May 24, 2024

Hello @ihelpco and @theprodev. Please refer the documentation about Adding a new country to send a pull request with your country.

Thanks in advance for contributor extending the supported countries.

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

Hello @YordanSoares and @theprodev.
Is there a way to make the states and cities: English in backend and Arabic in frontend?

from woocommerce_states_places.

theprodev avatar theprodev commented on May 24, 2024

@ihelpco. Yes, it seems possible. Should be no problem.

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

ok @theprodev , i will prepare a file in excel with the states and cities in Arabic and English. Is that what you need?
Thanks for your help.

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

@theprodev , i tried this way but it displayed the Arabic city name in frontend and backend:

$places['SA'] = array(
'01' => array(
'riyadh' => 'الرياض',
'buraidah' => 'بريدة',
),

from woocommerce_states_places.

YordanSoares avatar YordanSoares commented on May 24, 2024

Hello @theprodev and @ihelpco. I just publish v1.2.5-dev-SA (pre-release) for testing purpose, including Saudi Arabia with translation feature (you can translate to Arabic using states-cities-and-places-for-woocommerce-es_SA.po file included in languages directory.

Can you test this pre-release and give me feedback about it?

Thanks in advance.

from woocommerce_states_places.

YordanSoares avatar YordanSoares commented on May 24, 2024

Sorry, I just saw the correct filename to translation file should be states-cities-and-places-for-woocommerce-ar_SA.po instead states-cities-and-places-for-woocommerce-es_SA.po.

Please update to apply your translation. You should to have your WordPress language set in Algerian language to apply it.

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

Awesome, It is working as expected. HUGE Thanks.
I could translate the states and cities successfully.

One more thing, can we make the cities appear like this:
Frontend: Translated according to site language. (ex. Arabic for Arabic sites and English for English sites)
Backend: ALWAYS English.

Because ARAMEX and all other Shipping Carriers require the city name to be English so that it can calculate the shipping rates in checkout page, and you can prepare shipment using the official "Aramex Shipping WooCommerce Plugin" from the edit order page.

As you can see, the city name is Arabic but I need it to be always English regardless of the site language:
Screen Shot 2020-04-03 at 3 13 14 AM

Screen Shot 2020-04-03 at 2 52 22 AM

Screen Shot 2020-04-03 at 2 48 36 AM

from woocommerce_states_places.

YordanSoares avatar YordanSoares commented on May 24, 2024

I'm happy to read we achieve the front-end localization.

To add multilingual support to your site, you should to use a multilingual plugin like WPML. Maybe you can choose to display only english in dashboard, but I don't know how to do it yet. I tested the last pre-release I let you above, using WPML + String Translation Addon (Saudi Arabia location are translation ready now). Please see how the multilingual feature works in frontend (click to open a video screen capture):

Multilingual support for locations

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

I tried the multilingual, it is working great.

I changed my user Dashboard language to English and the state name is a dropdown menu in English, which is good.
But If we can make the City field to be a dropdown, it will be English too. I hope you can make it a dropdown menu.
Thanks
Screen Shot 2020-04-03 at 3 30 56 AM

from woocommerce_states_places.

YordanSoares avatar YordanSoares commented on May 24, 2024

Hello @ihelpco,

Thanks for your feedback. I will add that issue to our list to fix it in a near future release.

I'll let open this issue to report when is done 👍

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

Hello @YordanSoares,
I appreciate it. Thanks

from woocommerce_states_places.

ihelpco avatar ihelpco commented on May 24, 2024

Hello @YordanSoares , I guess we can make it this way:

global $places;

$places['SA'] = array(
// Riyadh Region
'SA-01' => array(
'riyadh' => _x('Riyadh', 'Governorates of Saudi Arabia', 'states-cities-and-places-for-woocommerce'),
),

So, the first (riyadh) is the base name which will be read by Aramex, and the second (Riyadh) is the string that can be translated.

I am trying to get ideas from this and this.
Please try it.

from woocommerce_states_places.

khalid147 avatar khalid147 commented on May 24, 2024

Hello @ihelpco @theprodev

If you guys are in Saudi Arabia, I would really like your help in my project.. please email me [email protected] or contact me 0580915170

from woocommerce_states_places.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.