Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 707839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:19:23+00:00 2026-05-14T04:19:23+00:00

What options are there for localizing an app on Google App Engine? How do

  • 0

What options are there for localizing an app on Google App Engine? How do you do it using Webapp, Django, web2py or [insert framework here].

1. Readable URLs and entity key names

Readable URLs are good for usability and search engine optimization (Stack Overflow is a good example on how to do it). On Google App Engine, key based queries are recommended for performance reasons. It follows that it is good practice to use the entity key name in the URL, so that the entity can be fetched from the datastore as quickly as possible.

Some characters have special meaning in URLs (&, “, ‘ etc). To be able to use key names as parts of an URL, they should not contain any of these characters. Currently I use the function below to create key names:

import re
import unicodedata

def urlify(unicode_string):

    """Translates latin1 unicode strings to url friendly ASCII.

    Converts accented latin1 characters to their non-accented ASCII
    counterparts, converts to lowercase, converts spaces to hyphens 
    and removes all characters that are not alphanumeric ASCII.

    Arguments
        unicode_string:     Unicode encoded string.

    Returns
        String consisting of alphanumeric (ASCII) characters and hyphens.
    """

    str = unicodedata.normalize('NFKD', unicode_string).encode('ASCII',
                                                               'ignore')
    str = re.sub('[^\w\s-]', '', str).strip().lower()
    return re.sub('[-\s]+', '-', str)

This is basically a whitelist for approved characters. It works fine for English and Swedish, however it will fail for non-western scripts and remove letters from some western ones (like Norwegian and Danish with their œ and ø).

Can anyone suggest a method that works with more languages? Would it be better to remove problematic characters (blacklist)?

2. Translating templates

Does Django internationalization and localization work on Google App Engine? Are there any extra steps that must be performed? Is it possible to use Django i18n and l10n for Django templates while using Webapp?

The Jinja2 template language provides integration with Babel. How well does this work, in your experience?

What options are avilable for your chosen template language?

3. Translated datastore content

When serving content from (or storing it to) the datastore: Is there a better way than getting the accept_language parameter from the HTTP request and matching this with a language property that you have set with each entity?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:19:24+00:00Added an answer on May 14, 2026 at 4:19 am

    Regarding point 1, there’s really no need to go to such lengths: Simply use unicode key names. They’ll be encoded as UTF-8 in the datastore for you.

    Regarding point 3, there are many ways to handle language detection. Certainly accept_language should be part of it, and you’ll find webob’s accept_language support particularly useful here (hopefully Django or your framework-of-choice has something similar). It’s quite often the case, however, that a user’s browser’s language configuration isn’t correct, so you’ll want to make sure there’s some way for the user to override the detected language – for example, with a link on each page to change the language, setting a preference cookie.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 404k
  • Answers 404k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could write a response header first, and then send… May 15, 2026 at 5:35 am
  • Editorial Team
    Editorial Team added an answer For inserting lots of data into the DB in bulk… May 15, 2026 at 5:35 am
  • Editorial Team
    Editorial Team added an answer I think YAML is great for this purpose, actually: jobs:… May 15, 2026 at 5:35 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.